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