(self)
| 174 | dt1.utcoffset() |
| 175 | |
| 176 | def test_non_abstractness(self): |
| 177 | # In order to allow subclasses to get pickled, the C implementation |
| 178 | # wasn't able to get away with having __init__ raise |
| 179 | # NotImplementedError. |
| 180 | useless = tzinfo() |
| 181 | dt = datetime.max |
| 182 | self.assertRaises(NotImplementedError, useless.tzname, dt) |
| 183 | self.assertRaises(NotImplementedError, useless.utcoffset, dt) |
| 184 | self.assertRaises(NotImplementedError, useless.dst, dt) |
| 185 | |
| 186 | def test_subclass_must_override(self): |
| 187 | class NotEnough(tzinfo): |
nothing calls this directly
no test coverage detected