(self)
| 638 | |
| 639 | @support.cpython_only |
| 640 | def test_precision_c_limits(self): |
| 641 | _testcapi = import_module("_testcapi") |
| 642 | INT_MAX = _testcapi.INT_MAX |
| 643 | |
| 644 | f = 1.2 |
| 645 | with self.assertRaises(ValueError) as cm: |
| 646 | format(f, ".%sf" % (INT_MAX + 1)) |
| 647 | |
| 648 | c = complex(f) |
| 649 | with self.assertRaises(ValueError) as cm: |
| 650 | format(c, ".%sf" % (INT_MAX + 1)) |
| 651 | |
| 652 | def test_g_format_has_no_trailing_zeros(self): |
| 653 | # regression test for bugs.python.org/issue40780 |
nothing calls this directly
no test coverage detected