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

Method test_slowest_interrupted

Lib/test/test_regrtest.py:1179–1196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1177 self.check_line(output, regex)
1178
1179 def test_slowest_interrupted(self):
1180 # Issue #25373: test --slowest with an interrupted test
1181 code = TEST_INTERRUPTED
1182 test = self.create_test("sigint", code=code)
1183
1184 for multiprocessing in (False, True):
1185 with self.subTest(multiprocessing=multiprocessing):
1186 if multiprocessing:
1187 args = ("--slowest", "-j2", test)
1188 else:
1189 args = ("--slowest", test)
1190 output = self.run_tests(*args, exitcode=EXITCODE_INTERRUPTED)
1191 self.check_executed_tests(output, test,
1192 omitted=test, interrupted=True,
1193 stats=0)
1194
1195 regex = ('10 slowest tests:\n')
1196 self.check_line(output, regex)
1197
1198 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: Regex didn't match: '^lines +cov% +module +\\(path\\)\\n(?: *[0-9]+ *[0-9]{1,2}\\.[0-9]% *[^ ]+ +\\([^)]+\\)+)+' not found in 'Warning: collecting coverage without -j is imprecise. Configure --with-pydebug and run -m test -T -j for best results.\nUsing random seed: 2780369491\n0:00:00 Run 1 test sequentially in a single process\n0:00:00 [1/1] test_regrtest_coverage\n0:00:00 [1/1] test_regrtest_coverage passed\n\n== Tests result: SUCCESS ==\n\n1 test OK.\n\nTotal duration: 102 ms\nTotal tests: run=1\nTotal test files: run=1/1\nResult: SUCCESS\n'
1199 def test_coverage(self):

Callers

nothing calls this directly

Calls 5

run_testsMethod · 0.95
create_testMethod · 0.80
subTestMethod · 0.80
check_executed_testsMethod · 0.80
check_lineMethod · 0.80

Tested by

no test coverage detected