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

Method test_nocaret

Lib/test/test_traceback.py:151–155  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

149 self.assertEqual(err[2].count("^"), 30)
150
151 def test_nocaret(self):
152 exc = SyntaxError("error", ("x.py", 23, None, "bad syntax"))
153 err = traceback.format_exception_only(SyntaxError, exc)
154 self.assertEqual(len(err), 3)
155 self.assertEqual(err[1].strip(), "bad syntax")
156
157 @force_not_colorized
158 def test_no_caret_with_no_debug_ranges_flag(self):

Callers

nothing calls this directly

Calls 3

format_exception_onlyMethod · 0.80
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected