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

Method test_with_two_commas_in_format_specifier

Lib/test/test_format.py:663–666  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

661 self.assertEqual(format(12300050.0, "#.6g"), "1.23000e+07")
662
663 def test_with_two_commas_in_format_specifier(self):
664 error_msg = re.escape("Cannot specify ',' with ','.")
665 with self.assertRaisesRegex(ValueError, error_msg):
666 '{:,,}'.format(1)
667
668 def test_with_two_underscore_in_format_specifier(self):
669 error_msg = re.escape("Cannot specify '_' with '_'.")

Callers

nothing calls this directly

Calls 3

escapeMethod · 0.80
assertRaisesRegexMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected