(self, pytester: Pytester)
| 3655 | ) |
| 3656 | |
| 3657 | def test_scoped(self, pytester: Pytester) -> None: |
| 3658 | pytester.makepyfile( |
| 3659 | """ |
| 3660 | import pytest |
| 3661 | @pytest.fixture(scope="module") |
| 3662 | def arg1(): |
| 3663 | print("setup") |
| 3664 | yield 1 |
| 3665 | print("teardown") |
| 3666 | def test_1(arg1): |
| 3667 | print("test1", arg1) |
| 3668 | def test_2(arg1): |
| 3669 | print("test2", arg1) |
| 3670 | """ |
| 3671 | ) |
| 3672 | result = pytester.runpytest("-s") |
| 3673 | result.stdout.fnmatch_lines( |
| 3674 | """ |
| 3675 | *setup* |
| 3676 | *test1 1* |
| 3677 | *test2 1* |
| 3678 | *teardown* |
| 3679 | """ |
| 3680 | ) |
| 3681 | |
| 3682 | def test_setup_exception(self, pytester: Pytester) -> None: |
| 3683 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected