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

Method test_grouping_and_padding

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

Source from the content-addressed store, hash-verified

171 self._test_format_string("%+f", -42, grouping=1, out='-42.000000')
172
173 def test_grouping_and_padding(self):
174 self._test_format_string("%20.f", -42, grouping=1, out='-42'.rjust(20))
175 if self.sep:
176 self._test_format_string("%+10.f", -4200, grouping=1,
177 out=('-4%s200' % self.sep).rjust(10))
178 self._test_format_string("%-10.f", -4200, grouping=1,
179 out=('-4%s200' % self.sep).ljust(10))
180
181 def test_integer_grouping(self):
182 self._test_format_string("%d", 4200, grouping=True, out='4%s200' % self.sep)

Callers

nothing calls this directly

Calls 3

_test_format_stringMethod · 0.80
rjustMethod · 0.45
ljustMethod · 0.45

Tested by

no test coverage detected