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

Method test_hash_edge_cases

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

Source from the content-addressed store, hash-verified

4630 self.assertEqual(t.strftime("%Z"), '\ud800')
4631
4632 def test_hash_edge_cases(self):
4633 # Offsets that overflow a basic time.
4634 t1 = self.theclass(0, 1, 2, 3, tzinfo=FixedOffset(1439, ""))
4635 t2 = self.theclass(0, 0, 2, 3, tzinfo=FixedOffset(1438, ""))
4636 self.assertEqual(hash(t1), hash(t2))
4637
4638 t1 = self.theclass(23, 58, 6, 100, tzinfo=FixedOffset(-1000, ""))
4639 t2 = self.theclass(23, 48, 6, 100, tzinfo=FixedOffset(-1010, ""))
4640 self.assertEqual(hash(t1), hash(t2))
4641
4642 def test_pickling(self):
4643 # Try one without a tzinfo.

Callers

nothing calls this directly

Calls 2

FixedOffsetClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected