(self, pytester: Pytester)
| 434 | |
| 435 | class TestSessionReports: |
| 436 | def test_collect_result(self, pytester: Pytester) -> None: |
| 437 | col = pytester.getmodulecol( |
| 438 | """ |
| 439 | def test_func1(): |
| 440 | pass |
| 441 | class TestClass(object): |
| 442 | pass |
| 443 | """ |
| 444 | ) |
| 445 | rep = runner.collect_one_node(col) |
| 446 | assert not rep.failed |
| 447 | assert not rep.skipped |
| 448 | assert rep.passed |
| 449 | locinfo = rep.location |
| 450 | assert locinfo[0] == col.path.name |
| 451 | assert not locinfo[1] |
| 452 | assert locinfo[2] == col.path.name |
| 453 | res = rep.result |
| 454 | assert len(res) == 2 |
| 455 | assert res[0].name == "test_func1" |
| 456 | assert res[1].name == "TestClass" |
| 457 | |
| 458 | |
| 459 | reporttypes: List[Type[reports.BaseReport]] = [ |
nothing calls this directly
no test coverage detected