(self, pytester: Pytester)
| 263 | ) |
| 264 | |
| 265 | def test_capturing_outerr(self, pytester: Pytester) -> None: |
| 266 | p1 = pytester.makepyfile( |
| 267 | """\ |
| 268 | import sys |
| 269 | def test_capturing(): |
| 270 | print(42) |
| 271 | sys.stderr.write(str(23)) |
| 272 | def test_capturing_error(): |
| 273 | print(1) |
| 274 | sys.stderr.write(str(2)) |
| 275 | raise ValueError |
| 276 | """ |
| 277 | ) |
| 278 | result = pytester.runpytest(p1) |
| 279 | result.stdout.fnmatch_lines( |
| 280 | [ |
| 281 | "*test_capturing_outerr.py .F*", |
| 282 | "====* FAILURES *====", |
| 283 | "____*____", |
| 284 | "*test_capturing_outerr.py:8: ValueError", |
| 285 | "*--- Captured stdout *call*", |
| 286 | "1", |
| 287 | "*--- Captured stderr *call*", |
| 288 | "2", |
| 289 | ] |
| 290 | ) |
| 291 | |
| 292 | |
| 293 | class TestLoggingInteraction: |
nothing calls this directly
no test coverage detected