(self, pytester: Pytester)
| 1962 | reprec.assertoutcome(passed=1) |
| 1963 | |
| 1964 | def test_funcarg_and_setup(self, pytester: Pytester) -> None: |
| 1965 | pytester.makepyfile( |
| 1966 | """ |
| 1967 | import pytest |
| 1968 | values = [] |
| 1969 | @pytest.fixture(scope="module") |
| 1970 | def arg(): |
| 1971 | values.append(1) |
| 1972 | return 0 |
| 1973 | @pytest.fixture(scope="module", autouse=True) |
| 1974 | def something(arg): |
| 1975 | values.append(2) |
| 1976 | |
| 1977 | def test_hello(arg): |
| 1978 | assert len(values) == 2 |
| 1979 | assert values == [1,2] |
| 1980 | assert arg == 0 |
| 1981 | |
| 1982 | def test_hello2(arg): |
| 1983 | assert len(values) == 2 |
| 1984 | assert values == [1,2] |
| 1985 | assert arg == 0 |
| 1986 | """ |
| 1987 | ) |
| 1988 | reprec = pytester.inline_run() |
| 1989 | reprec.assertoutcome(passed=2) |
| 1990 | |
| 1991 | def test_uses_parametrized_resource(self, pytester: Pytester) -> None: |
| 1992 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected