(pytester: Pytester)
| 127 | |
| 128 | |
| 129 | def test_collect_capturing(pytester: Pytester) -> None: |
| 130 | p = pytester.makepyfile( |
| 131 | """ |
| 132 | import sys |
| 133 | |
| 134 | print("collect %s failure" % 13) |
| 135 | sys.stderr.write("collect %s_stderr failure" % 13) |
| 136 | import xyz42123 |
| 137 | """ |
| 138 | ) |
| 139 | result = pytester.runpytest(p) |
| 140 | result.stdout.fnmatch_lines( |
| 141 | [ |
| 142 | "*Captured stdout*", |
| 143 | "collect 13 failure", |
| 144 | "*Captured stderr*", |
| 145 | "collect 13_stderr failure", |
| 146 | ] |
| 147 | ) |
| 148 | |
| 149 | |
| 150 | class TestPerTestCapturing: |
nothing calls this directly
no test coverage detected