MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_feedback_to_output_false

Function test_feedback_to_output_false

tests/test_cmd2.py:744–757  ·  view source on GitHub ↗
(redirection_app)

Source from the content-addressed store, hash-verified

742
743
744def 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
760def test_disallow_redirection(redirection_app: RedirectionApp, capsys: pytest.CaptureFixture[str]) -> None:

Callers

nothing calls this directly

Calls 3

run_cmdFunction · 0.85
readMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…