MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_extract

Method test_extract

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

Source from the content-addressed store, hash-verified

5054 tzinfo=met))
5055
5056 def test_extract(self):
5057 met = FixedOffset(60, "MET")
5058 dt = self.theclass(2002, 3, 4, 18, 45, 3, 1234, tzinfo=met)
5059 self.assertEqual(dt.date(), date(2002, 3, 4))
5060 self.assertEqual(dt.time(), time(18, 45, 3, 1234))
5061 self.assertEqual(dt.timetz(), time(18, 45, 3, 1234, tzinfo=met))
5062
5063 def test_tz_aware_arithmetic(self):
5064 now = self.theclass.now()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected