(self, pytester: Pytester)
| 587 | ) |
| 588 | |
| 589 | def test_collect_two_commandline_args(self, pytester: Pytester) -> None: |
| 590 | p = pytester.makepyfile("def test_func(): pass") |
| 591 | aaa = pytester.mkpydir("aaa") |
| 592 | bbb = pytester.mkpydir("bbb") |
| 593 | test_aaa = aaa.joinpath("test_aaa.py") |
| 594 | shutil.copy(p, test_aaa) |
| 595 | test_bbb = bbb.joinpath("test_bbb.py") |
| 596 | p.replace(test_bbb) |
| 597 | |
| 598 | id = "." |
| 599 | |
| 600 | items, hookrec = pytester.inline_genitems(id) |
| 601 | assert len(items) == 2 |
| 602 | pprint.pprint(hookrec.calls) |
| 603 | hookrec.assert_contains( |
| 604 | [ |
| 605 | ("pytest_collectstart", "collector.path == test_aaa"), |
| 606 | ("pytest_pycollect_makeitem", "name == 'test_func'"), |
| 607 | ("pytest_collectreport", "report.nodeid == 'aaa/test_aaa.py'"), |
| 608 | ("pytest_collectstart", "collector.path == test_bbb"), |
| 609 | ("pytest_pycollect_makeitem", "name == 'test_func'"), |
| 610 | ("pytest_collectreport", "report.nodeid == 'bbb/test_bbb.py'"), |
| 611 | ] |
| 612 | ) |
| 613 | |
| 614 | def test_serialization_byid(self, pytester: Pytester) -> None: |
| 615 | pytester.makepyfile("def test_func(): pass") |
nothing calls this directly
no test coverage detected