khal icon indicating copy to clipboard operation
khal copied to clipboard

Test test_recurrence_id_with_timezone failing

Open WhyNotHugo opened this issue 5 months ago • 0 comments

Describe the bug

A report on IRC mentioned that test test_recurrence_id_with_timezone was failing on void linux i686, and also on glibc x86_64, but only sporadically.

I ran the test locally on Alpine Edge x86_64, and it failed with the same error.

If applicable: Stack Trace

________________________________________ TestSpecial.test_recurrence_id_with_timezone _________________________________________

self = <tests.khalendar_utils_test.TestSpecial object at 0x7fecf46aba70>

    def test_recurrence_id_with_timezone(self):
        vevent = _get_vevent(recurrence_id_with_timezone)
        dtstart = icalendar_helpers.expand(vevent, berlin)
        assert len(dtstart) == 1
>       assert dtstart[0][0] == berlin.localize(
            dt.datetime(2013, 11, 13, 19, 0))
E       AssertionError: assert datetime.datetime(2013, 11, 13, 19, 0) == datetime.datetime(2013, 11, 13, 19, 0, tzinfo=<DstTzInfo 'Europe/Berlin' CET+1:00:00 STD>)
E        +  where datetime.datetime(2013, 11, 13, 19, 0, tzinfo=<DstTzInfo 'Europe/Berlin' CET+1:00:00 STD>) = localize(datetime.datetime(2013, 11, 13, 19, 0))
E        +    where localize = <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD>.localize
E        +    and   datetime.datetime(2013, 11, 13, 19, 0) = <class 'datetime.datetime'>(2013, 11, 13, 19, 0)
E        +      where <class 'datetime.datetime'> = dt.datetime

tests/khalendar_utils_test.py:619: AssertionError

To Reproduce

tox -e py -- -k test_recurrence_id_with_timezone

Expected behavior

Test should pass consistently

OS, version, khal version and how you installed it:

  • Khal master (df6545645740f5ffe6ec00a97f7b5ff195ff60f4)
  • Python 3.12.11
  • Alpine Linux (but reproducible on others)
  • n/a
  • pip freeze: https://gist.github.com/WhyNotHugo/f22eedb6ac4128b9e8cf219c4c86842b#file-gistfile1-txt

WhyNotHugo avatar Jul 06 '25 23:07 WhyNotHugo