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

Method testPosixOffset

tests/test_tz.py:1544–1551  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1542 self.assertNotEqual(TZS1, TZS3)
1543
1544 def testPosixOffset(self):
1545 TZ1 = tz.tzstr('UTC-3')
1546 self.assertEqual(datetime(2015, 1, 1, tzinfo=TZ1).utcoffset(),
1547 timedelta(hours=-3))
1548
1549 TZ2 = tz.tzstr('UTC-3', posix_offset=True)
1550 self.assertEqual(datetime(2015, 1, 1, tzinfo=TZ2).utcoffset(),
1551 timedelta(hours=+3))
1552
1553 def testStrInequalityUnsupported(self):
1554 TZS = tz.tzstr('EST5EDT')

Callers

nothing calls this directly

Calls 1

utcoffsetMethod · 0.45

Tested by

no test coverage detected