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

Function test_exc_common

Lib/test/test_format.py:89–94  ·  view source on GitHub ↗
(formatstr, args, exception, excmsg)

Source from the content-addressed store, hash-verified

87 raise TestFailed('did not get expected exception: %s' % excmsg)
88
89def test_exc_common(formatstr, args, exception, excmsg):
90 # test str and bytes
91 test_exc(formatstr, args, exception, excmsg)
92 if isinstance(args, dict):
93 args = {k.encode('ascii'): v for k, v in args.items()}
94 test_exc(formatstr.encode('ascii'), args, exception, excmsg)
95
96class FormatTest(unittest.TestCase):
97

Callers 1

test_common_formatMethod · 0.85

Calls 3

test_excFunction · 0.85
encodeMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…