collective / icalendar

icalendar parser library for Python

Home Page:https://icalendar.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run tests located in different time zones

niccokunzmann opened this issue · comments

The tests are currently running in the timezone of the server.

#466 (comment)
shows that the TZ environment variable has an influence on the behavior of icalendar.

I would like to be sure that the tests work independent of the time zone that they run in.
tox should isolate the tests from the environment variables and as such always have TZ not set.
Can we make the tests run in different time zones?

Related Work

An idea of how to do it is in recurring_ical_events:

Possible implementation

Maybe, tox can be used to set the TZ variable when the tests are run?

commented

When working on todoman a common pattern we noticed is test breaking depending on whether the timezone is east of UTC or west of UTC (and usually, the failure was due an actual bug).

I think usually testing with Argentina (UTC-3), Germany (UTC+1) and Japan (UTC+9) helps find a lot of bugs. It's also useful to test things close to midnight UTC, since it's a different day in different timezones.