(self)
| 262 | self.klass.from_file(fobj) |
| 263 | |
| 264 | def test_fromutc_errors(self): |
| 265 | key = next(iter(self.zones())) |
| 266 | zone = self.zone_from_key(key) |
| 267 | |
| 268 | bad_values = [ |
| 269 | (datetime(2019, 1, 1, tzinfo=timezone.utc), ValueError), |
| 270 | (datetime(2019, 1, 1), ValueError), |
| 271 | (date(2019, 1, 1), TypeError), |
| 272 | (time(0), TypeError), |
| 273 | (0, TypeError), |
| 274 | ("2019-01-01", TypeError), |
| 275 | ] |
| 276 | |
| 277 | for val, exc_type in bad_values: |
| 278 | with self.subTest(val=val): |
| 279 | with self.assertRaises(exc_type): |
| 280 | zone.fromutc(val) |
| 281 | |
| 282 | def test_utc(self): |
| 283 | zi = self.klass("UTC") |
nothing calls this directly
no test coverage detected