diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-04-26 13:34:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 13:34:05 -0400 |
commit | 90330f29a7fd1ebf03ef2b639f8bc44caf5c379a (patch) | |
tree | 7164ad7531a1d1dd02e63abdb3f41326be812fac /cmd2.py | |
parent | e8865d377faa0fbe06db79fa35b4b2b4cf838765 (diff) | |
parent | 3f92b77af7af983d31a336d215d10e2aaa19fe86 (diff) | |
download | cmd2-git-90330f29a7fd1ebf03ef2b639f8bc44caf5c379a.tar.gz |
Merge pull request #87 from python-cmd2/transcript_testing
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() |