(self, x)
| 305 | "".join("0123456789abcdef"[i] for i in digits) |
| 306 | |
| 307 | def check_format_1(self, x): |
| 308 | for base, mapper in (2, bin), (8, oct), (10, str), (10, repr), (16, hex): |
| 309 | got = mapper(x) |
| 310 | with self.subTest(x=x, mapper=mapper.__name__): |
| 311 | expected = self.slow_format(x, base) |
| 312 | self.assertEqual(got, expected) |
| 313 | with self.subTest(got=got): |
| 314 | self.assertEqual(int(got, 0), x) |
| 315 | |
| 316 | def test_format(self): |
| 317 | for x in special: |
no test coverage detected