(self)
| 156 | return ZoneDumpData.load_transition_examples(key) |
| 157 | |
| 158 | def test_str(self): |
| 159 | # Zones constructed with a key must have str(zone) == key |
| 160 | for key in self.zones(): |
| 161 | with self.subTest(key): |
| 162 | zi = self.zone_from_key(key) |
| 163 | |
| 164 | self.assertEqual(str(zi), key) |
| 165 | |
| 166 | # Zones with no key constructed should have str(zone) == repr(zone) |
| 167 | file_key = self.zoneinfo_data.keys[0] |
| 168 | file_path = self.zoneinfo_data.path_from_key(file_key) |
| 169 | |
| 170 | with open(file_path, "rb") as f: |
| 171 | with self.subTest(test_name="Repr test", path=file_path): |
| 172 | zi_ff = self.klass.from_file(f) |
| 173 | self.assertEqual(str(zi_ff), repr(zi_ff)) |
| 174 | |
| 175 | def test_repr(self): |
| 176 | # The repr is not guaranteed, but I think we can insist that it at |
nothing calls this directly
no test coverage detected