freezegun icon indicating copy to clipboard operation
freezegun copied to clipboard

Update unit tests to pass in different timezones

Open dcrowe opened this issue 5 years ago • 2 comments

Fixes #322

dcrowe avatar Dec 17 '19 11:12 dcrowe

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

dcrowe avatar Dec 17 '19 22:12 dcrowe

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).

pganssle avatar Jun 17 '21 21:06 pganssle