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

Method test_load_history_strings_empty

tests/test_pt_utils.py:542–554  ·  view source on GitHub ↗

Test loading history strings with empty history.

(self)

Source from the content-addressed store, hash-verified

540 assert list(history.load_history_strings()) == expected
541
542 def test_load_history_strings_empty(self):
543 """Test loading history strings with empty history."""
544 history = pt_utils.Cmd2History()
545 assert history._loaded
546 assert list(history.load_history_strings()) == []
547
548 history = pt_utils.Cmd2History([])
549 assert history._loaded
550 assert list(history.load_history_strings()) == []
551
552 history = pt_utils.Cmd2History(None)
553 assert history._loaded
554 assert list(history.load_history_strings()) == []
555
556 def test_get_strings(self):
557 history_strings = ["cmd1", "cmd2", "cmd2", "cmd3", "cmd2"]

Callers

nothing calls this directly

Calls 1

load_history_stringsMethod · 0.95

Tested by

no test coverage detected