freezegun
freezegun copied to clipboard
Update unit tests to pass in different timezones
Fixes #322
That _Utc class was totalled not needed. It is much simpler now.
I understand that this doesn't interact well with #89, but I'm looking for a smaller issue to chew on for my first contribution. :)
Tested in the following timezones:
# not in DST
TZ=Europe/Berlin make test
# in DST
TZ=Australia/Adelaide make test
# doesn't have DST
TZ=Australia/Queensland make test
# UTC
TZ=UTC make test
I think it would probably be a good idea to add a CI job that runs the tests in some non-UTC locale (or possibly in a few locales). Presumably it's OK to just use whatever the latest Python is and run the test suite in a America/New_York, Australia/Adelaide and Europe/London (or even just one of those, to start).