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

Method assert_exc_string

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

Source from the content-addressed store, hash-verified

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

Callers 3

test_print_excMethod · 0.95
test_main_exceptionMethod · 0.95

Calls 3

assertGreaterMethod · 0.80
assertStartsWithMethod · 0.80
splitlinesMethod · 0.45

Tested by

no test coverage detected