(pytester: Pytester)
| 1562 | |
| 1563 | @pytest.mark.xfail("not hasattr(os, 'dup')") |
| 1564 | def test_fdopen_kept_alive_issue124(pytester: Pytester) -> None: |
| 1565 | pytester.makepyfile( |
| 1566 | """ |
| 1567 | import os, sys |
| 1568 | k = [] |
| 1569 | def test_open_file_and_keep_alive(capfd): |
| 1570 | stdout = os.fdopen(1, 'w', 1) |
| 1571 | k.append(stdout) |
| 1572 | |
| 1573 | def test_close_kept_alive_file(): |
| 1574 | stdout = k.pop() |
| 1575 | stdout.close() |
| 1576 | """ |
| 1577 | ) |
| 1578 | result = pytester.runpytest() |
| 1579 | result.stdout.fnmatch_lines(["*2 passed*"]) |
| 1580 | |
| 1581 | |
| 1582 | def test_tbstyle_native_setup_error(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected