(self, pytester: Pytester)
| 2252 | reprec.assertoutcome(passed=2) |
| 2253 | |
| 2254 | def test_scope_session(self, pytester: Pytester) -> None: |
| 2255 | pytester.makepyfile( |
| 2256 | """ |
| 2257 | import pytest |
| 2258 | values = [] |
| 2259 | @pytest.fixture(scope="module") |
| 2260 | def arg(): |
| 2261 | values.append(1) |
| 2262 | return 1 |
| 2263 | |
| 2264 | def test_1(arg): |
| 2265 | assert arg == 1 |
| 2266 | def test_2(arg): |
| 2267 | assert arg == 1 |
| 2268 | assert len(values) == 1 |
| 2269 | class TestClass(object): |
| 2270 | def test3(self, arg): |
| 2271 | assert arg == 1 |
| 2272 | assert len(values) == 1 |
| 2273 | """ |
| 2274 | ) |
| 2275 | reprec = pytester.inline_run() |
| 2276 | reprec.assertoutcome(passed=3) |
| 2277 | |
| 2278 | def test_scope_session_exc(self, pytester: Pytester) -> None: |
| 2279 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected