| 5822 | # whether DST is assumed to be in effect. In this situation, |
| 5823 | # a ValueError should be raised by astimezone(). |
| 5824 | class tricky_notok(ok): |
| 5825 | def dst(self, dt): |
| 5826 | if dt.year == 2000: |
| 5827 | return None |
| 5828 | else: |
| 5829 | return 10*HOUR |
| 5830 | dt = self.theclass(2001, 1, 1).replace(tzinfo=utc_real) |
| 5831 | self.assertRaises(ValueError, dt.astimezone, tricky_notok()) |
| 5832 |