MCPcopy Index your code
hub / github.com/python/cpython / test_extract

Method test_extract

Lib/test/datetimetester.py:5243–5248  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5241 tzinfo=met))
5242
5243 def test_extract(self):
5244 met = FixedOffset(60, "MET")
5245 dt = self.theclass(2002, 3, 4, 18, 45, 3, 1234, tzinfo=met)
5246 self.assertEqual(dt.date(), date(2002, 3, 4))
5247 self.assertEqual(dt.time(), time(18, 45, 3, 1234))
5248 self.assertEqual(dt.timetz(), time(18, 45, 3, 1234, tzinfo=met))
5249
5250 def test_tz_aware_arithmetic(self):
5251 now = self.theclass.now()

Callers

nothing calls this directly

Calls 7

dateClass · 0.90
timeClass · 0.90
FixedOffsetClass · 0.85
dateMethod · 0.80
timetzMethod · 0.80
assertEqualMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected