pimutils / pimutils/khal

Test test_recurrence_id_with_timezone failing

Open
#1,416 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/khalendar_utils_test.py at test_recurrence_id_with_timezone and run tox -e py -- -k test_recurrence_id_with_timezone. Trace the recurrence_id_with_timezone fixture through icalendar_helpers.expand, comparing behavior across the reported environments. Done means the test passes consistently with the expected Europe/Berlin-aware datetime.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.