(self)
| 315 | class MyTimezone(timezone): pass |
| 316 | |
| 317 | def test_utcoffset(self): |
| 318 | dummy = self.DT |
| 319 | for h in [0, 1.5, 12]: |
| 320 | offset = h * HOUR |
| 321 | self.assertEqual(offset, timezone(offset).utcoffset(dummy)) |
| 322 | self.assertEqual(-offset, timezone(-offset).utcoffset(dummy)) |
| 323 | |
| 324 | with self.assertRaises(TypeError): self.EST.utcoffset('') |
| 325 | with self.assertRaises(TypeError): self.EST.utcoffset(5) |
| 326 | |
| 327 | |
| 328 | def test_dst(self): |
nothing calls this directly
no test coverage detected