Converting from UTC to local time and back gives the same instant.
(tz_source)
| 86 | |
| 87 | |
| 88 | def test_utc_round_trip(tz_source): |
| 89 | """Converting from UTC to local time and back gives the same instant.""" |
| 90 | for key in _keys(): |
| 91 | zone = tz.gettz(key) |
| 92 | for dt_utc in _probe_instants(zone): |
| 93 | dt = dt_utc.astimezone(zone) |
| 94 | assert dt.astimezone(UTC) == dt_utc, (key, dt_utc, dt) |
| 95 | |
| 96 | |
| 97 | def test_ambiguous_and_imaginary(tz_source): |
nothing calls this directly
no test coverage detected