(self)
| 5189 | self.assertEqual(derived.tzname(), 'cookie') |
| 5190 | |
| 5191 | def test_extreme_hashes(self): |
| 5192 | # If an attempt is made to hash these via subtracting the offset |
| 5193 | # then hashing a datetime object, OverflowError results. The |
| 5194 | # Python implementation used to blow up here. |
| 5195 | t = self.theclass(1, 1, 1, tzinfo=FixedOffset(1439, "")) |
| 5196 | hash(t) |
| 5197 | t = self.theclass(MAXYEAR, 12, 31, 23, 59, 59, 999999, |
| 5198 | tzinfo=FixedOffset(-1439, "")) |
| 5199 | hash(t) |
| 5200 | |
| 5201 | # OTOH, an OOB offset should blow up. |
| 5202 | t = self.theclass(5, 5, 5, tzinfo=FixedOffset(-1440, "")) |
| 5203 | self.assertRaises(ValueError, hash, t) |
| 5204 | |
| 5205 | def test_zones(self): |
| 5206 | est = FixedOffset(-300, "EST") |
nothing calls this directly
no test coverage detected