From 6eb8dde0d33df2d73f9c7ff75c6beddae5453ddd Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Fri, 9 Feb 2018 00:07:06 -0500 Subject: First past at unit test for persistent history feature Added pexpect to modules required for running unit tests. This opens the door for carefully crafted complex unit tests to verify intricate behavior. Tests like this are somewhat painful to write and slow to execute. However, they can enable testing complicated interactive behavior that we otherwise probably would not be able to test. --- examples/persistent_history.py | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/persistent_history.py') diff --git a/examples/persistent_history.py b/examples/persistent_history.py index 21a2cbf3..e3f646bf 100755 --- a/examples/persistent_history.py +++ b/examples/persistent_history.py @@ -13,6 +13,7 @@ class Cmd2PersistentHistory(cmd2.Cmd): def __init__(self): """""" cmd2.Cmd.__init__(self, persistent_history_file='~/.persistent_history.cmd2', persistent_history_length=500) + self.prompt = 'ph> ' # ... your class code here ... -- cgit v1.2.1