Mercurial > python-cmd2
comparison cmd2.py @ 408:a53ba40b9848
improving missing-end detection for transcript test
author | Catherine Devlin <catherine.devlin@gmail.com> |
---|---|
date | Sun, 07 Nov 2010 21:30:13 -0500 |
parents | f5aa16a22b52 |
children | 130889170679 |
comparison
equal
deleted
inserted
replaced
407:f5aa16a22b52 | 408:a53ba40b9848 |
---|---|
1514 # checking whitespace is a pain - let's skip it | 1514 # checking whitespace is a pain - let's skip it |
1515 expected = self.anyWhitespace.sub('', expected) | 1515 expected = self.anyWhitespace.sub('', expected) |
1516 result = self.anyWhitespace.sub('', result) | 1516 result = self.anyWhitespace.sub('', result) |
1517 self.assert_(re.match(expected, result, re.MULTILINE | re.DOTALL), message) | 1517 self.assert_(re.match(expected, result, re.MULTILINE | re.DOTALL), message) |
1518 except StopIteration: | 1518 except StopIteration: |
1519 message = 'Last %d lines never seen, beginning with\n%s' % (len(expected), expected[0]) | 1519 message = 'Final portion of test not returned, beginning at line %d' % (lineNum) |
1520 self.assert_(len(expected) < 3, message) | 1520 self.assert_(len(expected) < 3, message) |
1521 def tearDown(self): | 1521 def tearDown(self): |
1522 if self.CmdApp: | 1522 if self.CmdApp: |
1523 self.outputTrap.tearDown() | 1523 self.outputTrap.tearDown() |
1524 | 1524 |