MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / test_exclude_from_history

Function test_exclude_from_history

tests/test_history.py:840–857  ·  view source on GitHub ↗
(base_app)

Source from the content-addressed store, hash-verified

838
839
840def test_exclude_from_history(base_app) -> None:
841 # Run history command
842 run_cmd(base_app, "history")
843 verify_hi_last_result(base_app, 0)
844
845 # Verify that the history is empty
846 out, _err = run_cmd(base_app, "history")
847 assert out == []
848 verify_hi_last_result(base_app, 0)
849
850 # Now run a command which isn't excluded from the history
851 run_cmd(base_app, "help")
852
853 # And verify we have a history now ...
854 out, _err = run_cmd(base_app, "history")
855 expected = normalize(""" 1 help""")
856 assert out == expected
857 verify_hi_last_result(base_app, 1)
858
859
860#

Callers

nothing calls this directly

Calls 3

run_cmdFunction · 0.85
verify_hi_last_resultFunction · 0.85
normalizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…