(self)
| 381 | |
| 382 | @requires_resource('cpu') |
| 383 | def test_coverage(self): |
| 384 | tracer = trace.Trace(trace=0, count=1) |
| 385 | with captured_stdout() as stdout: |
| 386 | self._coverage(tracer) |
| 387 | stdout = stdout.getvalue() |
| 388 | self.assertIn("pprint.py", stdout) |
| 389 | self.assertIn("case.py", stdout) # from unittest |
| 390 | files = os.listdir(TESTFN) |
| 391 | self.assertIn("pprint.cover", files) |
| 392 | self.assertIn("unittest.case.cover", files) |
| 393 | |
| 394 | def test_coverage_ignore(self): |
| 395 | # Ignore all files, nothing should be traced nor printed |
nothing calls this directly
no test coverage detected