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

Method test_non_str_argument

Lib/test/test_exceptions.py:2101–2106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2099 self.assertEqual(exc.path, None)
2100
2101 def test_non_str_argument(self):
2102 # Issue #15778
2103 with check_warnings(('', BytesWarning), quiet=True):
2104 arg = b'abc'
2105 exc = ImportError(arg)
2106 self.assertEqual(str(arg), str(exc))
2107
2108 def test_copy_pickle(self):
2109 for kwargs in (dict(),

Callers

nothing calls this directly

Calls 3

check_warningsFunction · 0.90
strFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected