(self)
| 484 | |
| 485 | @support.cpython_only |
| 486 | def test_precision_c_limits(self): |
| 487 | _testcapi = import_module("_testcapi") |
| 488 | INT_MAX = _testcapi.INT_MAX |
| 489 | |
| 490 | f = 1.2 |
| 491 | with self.assertRaises(ValueError) as cm: |
| 492 | format(f, ".%sf" % (INT_MAX + 1)) |
| 493 | |
| 494 | c = complex(f) |
| 495 | with self.assertRaises(ValueError) as cm: |
| 496 | format(c, ".%sf" % (INT_MAX + 1)) |
| 497 | |
| 498 | def test_g_format_has_no_trailing_zeros(self): |
| 499 | # regression test for bugs.python.org/issue40780 |
nothing calls this directly
no test coverage detected