MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_nocaret

Method test_nocaret

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

Source from the content-addressed store, hash-verified

126 self.assertEqual(err[2].count("^"), 1)
127
128 def test_nocaret(self):
129 exc = SyntaxError("error", ("x.py", 23, None, "bad syntax"))
130 err = traceback.format_exception_only(SyntaxError, exc)
131 self.assertEqual(len(err), 3)
132 self.assertEqual(err[1].strip(), "bad syntax")
133
134 @force_not_colorized
135 def test_no_caret_with_no_debug_ranges_flag(self):

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
format_exception_onlyMethod · 0.80
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected