(self, pytester: Pytester)
| 22 | |
| 23 | class TestSetupState: |
| 24 | def test_setup(self, pytester: Pytester) -> None: |
| 25 | item = pytester.getitem("def test_func(): pass") |
| 26 | ss = item.session._setupstate |
| 27 | values = [1] |
| 28 | ss.setup(item) |
| 29 | ss.addfinalizer(values.pop, item) |
| 30 | assert values |
| 31 | ss.teardown_exact(None) |
| 32 | assert not values |
| 33 | |
| 34 | def test_teardown_exact_stack_empty(self, pytester: Pytester) -> None: |
| 35 | item = pytester.getitem("def test_func(): pass") |
nothing calls this directly
no test coverage detected