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

Class TestEnfold

tests/test_tz.py:2764–2785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2762
2763
2764class TestEnfold:
2765 def test_enter_fold_default(self):
2766 dt = tz.enfold(datetime(2020, 1, 19, 3, 32))
2767
2768 assert dt.fold == 1
2769
2770 def test_enter_fold(self):
2771 dt = tz.enfold(datetime(2020, 1, 19, 3, 32), fold=1)
2772
2773 assert dt.fold == 1
2774
2775 def test_exit_fold(self):
2776 dt = tz.enfold(datetime(2020, 1, 19, 3, 32), fold=0)
2777
2778 assert dt.fold == 0
2779
2780 def test_defold(self):
2781 dt = tz.enfold(datetime(2020, 1, 19, 3, 32), fold=1)
2782
2783 dt2 = tz.enfold(dt, fold=0)
2784
2785 assert dt2.fold == 0
2786
2787@pytest.mark.tz_resolve_imaginary
2788class ImaginaryDateTest(TzSourceMixin, unittest.TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected