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

Method test_hash_edge_cases

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

Source from the content-addressed store, hash-verified

4448 self.assertEqual(t.strftime("%Z"), '\ud800')
4449
4450 def test_hash_edge_cases(self):
4451 # Offsets that overflow a basic time.
4452 t1 = self.theclass(0, 1, 2, 3, tzinfo=FixedOffset(1439, ""))
4453 t2 = self.theclass(0, 0, 2, 3, tzinfo=FixedOffset(1438, ""))
4454 self.assertEqual(hash(t1), hash(t2))
4455
4456 t1 = self.theclass(23, 58, 6, 100, tzinfo=FixedOffset(-1000, ""))
4457 t2 = self.theclass(23, 48, 6, 100, tzinfo=FixedOffset(-1010, ""))
4458 self.assertEqual(hash(t1), hash(t2))
4459
4460 def test_pickling(self):
4461 # Try one without a tzinfo.

Callers

nothing calls this directly

Calls 3

hashFunction · 0.85
FixedOffsetClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected