Ejemplo n.º 1
0
 def test_SimpleOffsetTzInfo(self):
     """ Basic test for the SimpleOffsetTzInfo class """
     tests = (2, -4, 0, 3.5)
     for hours in tests:
         tz = SimpleOffsetTzInfo(hours)
         self.assertEqual(tz.offsetInHours, hours)
         self.assertEqual(tz.utcoffset(None), timedelta(hours=hours))
         self.assertEqual(tz.dst(None), timedelta(0))
         self.assertIsInstance(tz.__repr__(), str)
Ejemplo n.º 2
0
 def test_SimpleOffsetTzInfo(self):
     """ Basic test for the SimpleOffsetTzInfo class """
     tests = (2, -4, 0, 3.5)
     for hours in tests:
         tz = SimpleOffsetTzInfo(hours)
         self.assertEqual(tz.offsetInHours, hours)
         self.assertEqual(tz.utcoffset(None), timedelta(hours=hours))
         self.assertEqual(tz.dst(None), timedelta(0))
         self.assertIsInstance(tz.__repr__(), str)