(self, pytester: Pytester)
| 176 | |
| 177 | @pytest.mark.xfail(reason="unimplemented feature") |
| 178 | def test_capture_scope_cache(self, pytester: Pytester) -> None: |
| 179 | p = pytester.makepyfile( |
| 180 | """ |
| 181 | import sys |
| 182 | def setup_module(func): |
| 183 | print("module-setup") |
| 184 | def setup_function(func): |
| 185 | print("function-setup") |
| 186 | def test_func(): |
| 187 | print("in function") |
| 188 | assert 0 |
| 189 | def teardown_function(func): |
| 190 | print("in teardown") |
| 191 | """ |
| 192 | ) |
| 193 | result = pytester.runpytest(p) |
| 194 | result.stdout.fnmatch_lines( |
| 195 | [ |
| 196 | "*test_func():*", |
| 197 | "*Captured stdout during setup*", |
| 198 | "module-setup*", |
| 199 | "function-setup*", |
| 200 | "*Captured stdout*", |
| 201 | "in teardown*", |
| 202 | ] |
| 203 | ) |
| 204 | |
| 205 | def test_no_carry_over(self, pytester: Pytester) -> None: |
| 206 | p = pytester.makepyfile( |
nothing calls this directly
no test coverage detected