(self, pytester: Pytester)
| 583 | assert result.ret == 0 |
| 584 | |
| 585 | def test_funcarg_lookup_error(self, pytester: Pytester) -> None: |
| 586 | pytester.makeconftest( |
| 587 | """ |
| 588 | import pytest |
| 589 | |
| 590 | @pytest.fixture |
| 591 | def a_fixture(): pass |
| 592 | |
| 593 | @pytest.fixture |
| 594 | def b_fixture(): pass |
| 595 | |
| 596 | @pytest.fixture |
| 597 | def c_fixture(): pass |
| 598 | |
| 599 | @pytest.fixture |
| 600 | def d_fixture(): pass |
| 601 | """ |
| 602 | ) |
| 603 | pytester.makepyfile( |
| 604 | """ |
| 605 | def test_lookup_error(unknown): |
| 606 | pass |
| 607 | """ |
| 608 | ) |
| 609 | result = pytester.runpytest() |
| 610 | result.stdout.fnmatch_lines( |
| 611 | [ |
| 612 | "*ERROR at setup of test_lookup_error*", |
| 613 | " def test_lookup_error(unknown):*", |
| 614 | "E fixture 'unknown' not found", |
| 615 | "> available fixtures:*a_fixture,*b_fixture,*c_fixture,*d_fixture*monkeypatch,*", |
| 616 | # sorted |
| 617 | "> use 'py*test --fixtures *' for help on them.", |
| 618 | "*1 error*", |
| 619 | ] |
| 620 | ) |
| 621 | result.stdout.no_fnmatch_line("*INTERNAL*") |
| 622 | |
| 623 | def test_fixture_excinfo_leak(self, pytester: Pytester) -> None: |
| 624 | # on python2 sys.excinfo would leak into fixture executions |
nothing calls this directly
no test coverage detected