(self, x, base)
| 291 | self.check_bitop_identities_3(x, y, self.getran((lenx + leny)//2)) |
| 292 | |
| 293 | def slow_format(self, x, base): |
| 294 | digits = [] |
| 295 | sign = 0 |
| 296 | if x < 0: |
| 297 | sign, x = 1, -x |
| 298 | while x: |
| 299 | x, r = divmod(x, base) |
| 300 | digits.append(int(r)) |
| 301 | digits.reverse() |
| 302 | digits = digits or [0] |
| 303 | return '-'[:sign] + \ |
| 304 | {2: '0b', 8: '0o', 10: '', 16: '0x'}[base] + \ |
| 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): |
no test coverage detected