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

Function test_resolve_imaginary

tests/test_tz.py:2901–2909  ·  view source on GitHub ↗
(tz_source, key, dt, dt_exp)

Source from the content-addressed store, hash-verified

2899@pytest.mark.tz_resolve_imaginary
2900@pytest.mark.parametrize("key, dt, dt_exp", resolve_imaginary_tests)
2901def test_resolve_imaginary(tz_source, key, dt, dt_exp):
2902 tzi = _gettz(key)
2903 dt = dt.replace(tzinfo=tzi)
2904 dt_exp = dt_exp.replace(tzinfo=tzi)
2905
2906 dt_r = tz.resolve_imaginary(dt)
2907 assert dt_r == dt_exp
2908 assert dt_r.tzname() == dt_exp.tzname()
2909 assert dt_r.utcoffset() == dt_exp.utcoffset()

Callers

nothing calls this directly

Calls 4

_gettzFunction · 0.85
replaceMethod · 0.80
tznameMethod · 0.45
utcoffsetMethod · 0.45

Tested by

no test coverage detected