(self, pytester: Pytester)
| 514 | result.stdout.fnmatch_lines(["xxx42xxx"]) |
| 515 | |
| 516 | def test_stdfd_functional(self, pytester: Pytester) -> None: |
| 517 | reprec = pytester.inline_runsource( |
| 518 | """\ |
| 519 | def test_hello(capfd): |
| 520 | import os |
| 521 | os.write(1, b"42") |
| 522 | out, err = capfd.readouterr() |
| 523 | assert out.startswith("42") |
| 524 | capfd.close() |
| 525 | """ |
| 526 | ) |
| 527 | reprec.assertoutcome(passed=1) |
| 528 | |
| 529 | @pytest.mark.parametrize("nl", ("\n", "\r\n", "\r")) |
| 530 | def test_cafd_preserves_newlines(self, capfd, nl) -> None: |
nothing calls this directly
no test coverage detected