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

Method assert_exc_string

Lib/test/test_timeit.py:222–226  ·  view source on GitHub ↗
(self, exc_string, expected_exc_name)

Source from the content-addressed store, hash-verified

220 self.assertEqual(delta_times, DEFAULT_REPEAT * [0.0])
221
222 def assert_exc_string(self, exc_string, expected_exc_name):
223 exc_lines = exc_string.splitlines()
224 self.assertGreater(len(exc_lines), 2)
225 self.assertStartsWith(exc_lines[0], 'Traceback')
226 self.assertStartsWith(exc_lines[-1], expected_exc_name)
227
228 def test_print_exc(self):
229 s = io.StringIO()

Callers 3

test_print_excMethod · 0.95
test_main_exceptionMethod · 0.95

Calls 4

lenFunction · 0.85
assertGreaterMethod · 0.80
splitlinesMethod · 0.45
assertStartsWithMethod · 0.45

Tested by

no test coverage detected