(self, pytester: Pytester)
| 529 | |
| 530 | class TestSessionReports: |
| 531 | def test_collect_result(self, pytester: Pytester) -> None: |
| 532 | col = pytester.getmodulecol( |
| 533 | """ |
| 534 | def test_func1(): |
| 535 | pass |
| 536 | class TestClass(object): |
| 537 | pass |
| 538 | """ |
| 539 | ) |
| 540 | rep = runner.collect_one_node(col) |
| 541 | assert not rep.failed |
| 542 | assert not rep.skipped |
| 543 | assert rep.passed |
| 544 | locinfo = rep.location |
| 545 | assert locinfo is not None |
| 546 | assert locinfo[0] == col.path.name |
| 547 | assert not locinfo[1] |
| 548 | assert locinfo[2] == col.path.name |
| 549 | res = rep.result |
| 550 | assert len(res) == 2 |
| 551 | assert res[0].name == "test_func1" |
| 552 | assert res[1].name == "TestClass" |
| 553 | |
| 554 | |
| 555 | reporttypes: list[type[reports.BaseReport]] = [ |
nothing calls this directly
no test coverage detected