(self, pytester: Pytester)
| 616 | ) |
| 617 | |
| 618 | def test_collect_two_commandline_args(self, pytester: Pytester) -> None: |
| 619 | p = pytester.makepyfile(class="st">"def test_func(): pass") |
| 620 | aaa = pytester.mkpydir(class="st">"aaa") |
| 621 | bbb = pytester.mkpydir(class="st">"bbb") |
| 622 | test_aaa = aaa.joinpath(class="st">"test_aaa.py") |
| 623 | shutil.copy(p, test_aaa) |
| 624 | test_bbb = bbb.joinpath(class="st">"test_bbb.py") |
| 625 | p.replace(test_bbb) |
| 626 | |
| 627 | id = class="st">"." |
| 628 | |
| 629 | items, hookrec = pytester.inline_genitems(id) |
| 630 | assert len(items) == 2 |
| 631 | pprint.pprint(hookrec.calls) |
| 632 | hookrec.assert_contains( |
| 633 | [ |
| 634 | (class="st">"pytest_collectstart", class="st">"collector.path == test_aaa"), |
| 635 | (class="st">"pytest_pycollect_makeitem", class="st">"name == &class="cm">#x27;test_func'"), |
| 636 | (class="st">"pytest_collectreport", class="st">"report.nodeid == &class="cm">#x27;aaa/test_aaa.py'"), |
| 637 | (class="st">"pytest_collectstart", class="st">"collector.path == test_bbb"), |
| 638 | (class="st">"pytest_pycollect_makeitem", class="st">"name == &class="cm">#x27;test_func'"), |
| 639 | (class="st">"pytest_collectreport", class="st">"report.nodeid == &class="cm">#x27;bbb/test_bbb.py'"), |
| 640 | ] |
| 641 | ) |
| 642 | |
| 643 | def test_serialization_byid(self, pytester: Pytester) -> None: |
| 644 | pytester.makepyfile(class="st">"def test_func(): pass") |
nothing calls this directly
no test coverage detected