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

Method test_utcfromtimestamp

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

Source from the content-addressed store, hash-verified

2628 self.theclass.fromtimestamp(timestamp=time.time())
2629
2630 def test_utcfromtimestamp(self):
2631 import time
2632
2633 ts = time.time()
2634 expected = time.gmtime(ts)
2635 with self.assertWarns(DeprecationWarning):
2636 got = self.theclass.utcfromtimestamp(ts)
2637 self.verify_field_equality(expected, got)
2638
2639 # Run with US-style DST rules: DST begins 2 a.m. on second Sunday in
2640 # March (M3.2.0) and ends 2 a.m. on first Sunday in November (M11.1.0).

Callers

nothing calls this directly

Calls 4

verify_field_equalityMethod · 0.95
assertWarnsMethod · 0.80
timeMethod · 0.45
utcfromtimestampMethod · 0.45

Tested by

no test coverage detected