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

Method test_coverage

Lib/test/test_trace.py:388–397  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

386 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 'pprint.py' not found in ''
387 @requires_resource('cpu')
388 def test_coverage(self):
389 tracer = trace.Trace(trace=0, count=1)
390 with captured_stdout() as stdout:
391 self._coverage(tracer)
392 stdout = stdout.getvalue()
393 self.assertIn("pprint.py", stdout)
394 self.assertIn("case.py", stdout) # from unittest
395 files = os.listdir(TESTFN)
396 self.assertIn("pprint.cover", files)
397 self.assertIn("unittest.case.cover", files)
398
399 def test_coverage_ignore(self):
400 # Ignore all files, nothing should be traced nor printed

Callers

nothing calls this directly

Calls 5

_coverageMethod · 0.95
captured_stdoutFunction · 0.90
assertInMethod · 0.80
listdirMethod · 0.80
getvalueMethod · 0.45

Tested by

no test coverage detected