MCPcopy Create free account
hub / github.com/dateutil/dateutil / test_fixed_offset_never_ambiguous_or_imaginary

Function test_fixed_offset_never_ambiguous_or_imaginary

tests/test_tzfile.py:1394–1402  ·  view source on GitHub ↗

A fixed-offset zone has no ambiguous or imaginary times.

(dt)

Source from the content-addressed store, hash-verified

1392 ],
1393)
1394def test_fixed_offset_never_ambiguous_or_imaginary(dt):
1395 """A fixed-offset zone has no ambiguous or imaginary times."""
1396 zone = _fixed_offset_zone()
1397 for fold in (0, 1):
1398 dt_fold = tz.enfold(dt.replace(tzinfo=zone), fold=fold)
1399 assert not zone.is_ambiguous(dt_fold)
1400 assert not tz.datetime_ambiguous(dt_fold)
1401 assert tz.datetime_exists(dt_fold)
1402 assert dt_fold.utcoffset() == -5 * ONE_H
1403
1404
1405@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

_fixed_offset_zoneFunction · 0.85
replaceMethod · 0.80
is_ambiguousMethod · 0.45
utcoffsetMethod · 0.45

Tested by

no test coverage detected