| 742 | |
| 743 | |
| 744 | def test_feedback_to_output_false(redirection_app) -> None: |
| 745 | redirection_app.feedback_to_output = False |
| 746 | f, filename = tempfile.mkstemp(prefix="feedback_to_output", suffix=".txt") |
| 747 | os.close(f) |
| 748 | |
| 749 | try: |
| 750 | _out, err = run_cmd(redirection_app, f"print_feedback > {filename}") |
| 751 | |
| 752 | with open(filename) as f: |
| 753 | content = f.read().splitlines() |
| 754 | assert not content |
| 755 | assert "feedback" in err |
| 756 | finally: |
| 757 | os.remove(filename) |
| 758 | |
| 759 | |
| 760 | def test_disallow_redirection(redirection_app: RedirectionApp, capsys: pytest.CaptureFixture[str]) -> None: |