(self)
| 1024 | return self.klass.from_file(zonefile, key=tzstr) |
| 1025 | |
| 1026 | def test_tzstr_localized(self): |
| 1027 | for tzstr, cases in self.test_cases.items(): |
| 1028 | with self.subTest(tzstr=tzstr): |
| 1029 | zi = self.zone_from_tzstr(tzstr) |
| 1030 | |
| 1031 | for dt_naive, offset, _ in cases: |
| 1032 | dt = dt_naive.replace(tzinfo=zi) |
| 1033 | |
| 1034 | with self.subTest(tzstr=tzstr, dt=dt, offset=offset): |
| 1035 | self.assertEqual(dt.tzname(), offset.tzname) |
| 1036 | self.assertEqual(dt.utcoffset(), offset.utcoffset) |
| 1037 | self.assertEqual(dt.dst(), offset.dst) |
| 1038 | |
| 1039 | def test_tzstr_from_utc(self): |
| 1040 | for tzstr, cases in self.test_cases.items(): |
nothing calls this directly
no test coverage detected