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

Method test_padding

Lib/test/test_locale.py:198–201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

196 self._test_format_string("%+f", -42, grouping=0, out='-42.000000')
197
198 def test_padding(self):
199 self._test_format_string("%20.f", -42, grouping=0, out='-42'.rjust(20))
200 self._test_format_string("%+10.f", -4200, grouping=0, out='-4200'.rjust(10))
201 self._test_format_string("%-10.f", 4200, grouping=0, out='4200'.ljust(10))
202
203 def test_complex_formatting(self):
204 # Spaces in formatting string

Callers

nothing calls this directly

Calls 3

_test_format_stringMethod · 0.80
rjustMethod · 0.45
ljustMethod · 0.45

Tested by

no test coverage detected