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

Method test_fromtimestamp

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

Source from the content-addressed store, hash-verified

2653 self.assertEqual(expected.tm_sec, got.second)
2654
2655 def test_fromtimestamp(self):
2656 import time
2657
2658 ts = time.time()
2659 expected = time.localtime(ts)
2660 got = self.theclass.fromtimestamp(ts)
2661 self.verify_field_equality(expected, got)
2662 got = self.theclass.fromtimestamp(decimal.Decimal(ts))
2663 self.verify_field_equality(expected, got)
2664 got = self.theclass.fromtimestamp(fractions.Fraction(ts))
2665 self.verify_field_equality(expected, got)
2666
2667 def test_fromtimestamp_keyword_arg(self):
2668 import time

Callers

nothing calls this directly

Calls 3

verify_field_equalityMethod · 0.95
timeMethod · 0.45
fromtimestampMethod · 0.45

Tested by

no test coverage detected