(self, pytester: Pytester)
| 472 | assert result.ret == 3 |
| 473 | |
| 474 | def test_collectonly_simple(self, pytester: Pytester) -> None: |
| 475 | p = pytester.makepyfile( |
| 476 | """ |
| 477 | def test_func1(): |
| 478 | pass |
| 479 | class TestClass(object): |
| 480 | def test_method(self): |
| 481 | pass |
| 482 | """ |
| 483 | ) |
| 484 | result = pytester.runpytest("--collect-only", p) |
| 485 | # assert stderr.startswith("inserting into sys.path") |
| 486 | assert result.ret == 0 |
| 487 | result.stdout.fnmatch_lines( |
| 488 | [ |
| 489 | "*<Module *.py>", |
| 490 | "* <Function test_func1>", |
| 491 | "* <Class TestClass>", |
| 492 | "* <Function test_method>", |
| 493 | ] |
| 494 | ) |
| 495 | |
| 496 | def test_collectonly_error(self, pytester: Pytester) -> None: |
| 497 | p = pytester.makepyfile("import Errlkjqweqwe") |
nothing calls this directly
no test coverage detected