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

Class ImaginaryDateTest

tests/test_tz.py:2788–2808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2786
2787@pytest.mark.tz_resolve_imaginary
2788class ImaginaryDateTest(TzSourceMixin, unittest.TestCase):
2789 def testSydneyForward(self):
2790 tzi = tz.gettz("Australia/Sydney")
2791 dt = datetime(2018, 10, 7, 2, 30, tzinfo=tzi)
2792 dt_act = tz.resolve_imaginary(dt)
2793 dt_exp = datetime(2018, 10, 7, 3, 30, tzinfo=tzi)
2794 self.assertEqual(dt_act, dt_exp)
2795
2796 def testLondonForward(self):
2797 tzi = tz.gettz('Europe/London')
2798 dt = datetime(2018, 3, 25, 1, 30, tzinfo=tzi)
2799 dt_act = tz.resolve_imaginary(dt)
2800 dt_exp = datetime(2018, 3, 25, 2, 30, tzinfo=tzi)
2801 self.assertEqual(dt_act, dt_exp)
2802
2803 def testKyivForward(self):
2804 tzi = tz.gettz("Europe/Kyiv")
2805 dt = datetime(2018, 3, 25, 3, 30, tzinfo=tzi)
2806 dt_act = tz.resolve_imaginary(dt)
2807 dt_exp = datetime(2018, 3, 25, 4, 30, tzinfo=tzi)
2808 self.assertEqual(dt_act, dt_exp)
2809
2810
2811class ImaginaryDateTzdataTest(ImaginaryDateTest):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected