diff options
author | Todd Leonhardt <tleonhardt@gmail.com> | 2017-04-26 13:22:23 -0400 |
---|---|---|
committer | Todd Leonhardt <tleonhardt@gmail.com> | 2017-04-26 13:22:23 -0400 |
commit | 3f92b77af7af983d31a336d215d10e2aaa19fe86 (patch) | |
tree | 7164ad7531a1d1dd02e63abdb3f41326be812fac /cmd2.py | |
parent | e8865d377faa0fbe06db79fa35b4b2b4cf838765 (diff) | |
download | cmd2-git-3f92b77af7af983d31a336d215d10e2aaa19fe86.tar.gz |
Transcript testing now calls preloop() before and postloop() after
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2030,6 +2030,10 @@ class Cmd2TestCase(unittest.TestCase): self.cmdapp = self.CmdApp() self.fetchTranscripts() + # Make sure any required initialization gets done and flush the output buffer + self.cmdapp.preloop() + self.outputTrap.read() + def runTest(self): # was testall if self.CmdApp: its = sorted(self.transcripts.items()) @@ -2095,6 +2099,9 @@ class Cmd2TestCase(unittest.TestCase): def tearDown(self): if self.CmdApp: + # Make sure any required cleanup gets done + self.cmdapp.postloop() + self.outputTrap.tear_down() |