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

Method test_date_from_timestamp

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

Source from the content-addressed store, hash-verified

7137 self.assertEqual(c_api_delta, exp_delta)
7138
7139 def test_date_from_timestamp(self):
7140 ts = datetime(1995, 4, 12).timestamp()
7141
7142 for macro in False, True:
7143 with self.subTest(macro=macro):
7144 d = _testcapi.get_date_fromtimestamp(int(ts), macro)
7145
7146 self.assertEqual(d, date(1995, 4, 12))
7147
7148 def test_datetime_from_timestamp(self):
7149 cases = [

Callers

nothing calls this directly

Calls 5

datetimeClass · 0.90
dateClass · 0.90
timestampMethod · 0.80
subTestMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected