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

Method test_unicode_in_error_message

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

Source from the content-addressed store, hash-verified

706 eval("f'xx{value:{bad_format_spec}}yy'")
707
708 def test_unicode_in_error_message(self):
709 str_err = re.escape(
710 "Invalid format specifier '%ЫйЯЧ' for object of type 'str'")
711 with self.assertRaisesRegex(ValueError, str_err):
712 "{a:%ЫйЯЧ}".format(a='a')
713
714 def test_negative_zero(self):
715 ## default behavior

Callers

nothing calls this directly

Calls 3

escapeMethod · 0.80
assertRaisesRegexMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected