MCPcopy Index your code
hub / github.com/python/cpython / test_floatformatting

Method test_floatformatting

Lib/test/string_tests.py:1461–1468  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1459 (_testcapi.UINT_MAX + 1, 1. / 7))
1460
1461 def test_floatformatting(self):
1462 # float formatting
1463 for prec in range(100):
1464 format = '%%.%if' % prec
1465 value = 0.01
1466 for x in range(60):
1467 value = value * 3.14159265359 / 3.0 * 10.0
1468 self.checkcall(format, "__mod__", value)
1469
1470 def test_inplace_rewrites(self):
1471 # Check that strings don't copy and modify cached single-character strings

Callers

nothing calls this directly

Calls 1

checkcallMethod · 0.45

Tested by

no test coverage detected