| 388 | self.assertTrue(tz >= SMALLEST) |
| 389 | |
| 390 | def test_aware_datetime(self): |
| 391 | # test that timezone instances can be used by datetime |
| 392 | t = datetime(1, 1, 1) |
| 393 | for tz in [timezone.min, timezone.max, timezone.utc]: |
| 394 | self.assertEqual(tz.tzname(t), |
| 395 | t.replace(tzinfo=tz).tzname()) |
| 396 | self.assertEqual(tz.utcoffset(t), |
| 397 | t.replace(tzinfo=tz).utcoffset()) |
| 398 | self.assertEqual(tz.dst(t), |
| 399 | t.replace(tzinfo=tz).dst()) |
| 400 | |
| 401 | def test_pickle(self): |
| 402 | for tz in self.ACDT, self.EST, timezone.min, timezone.max: |