Commit 16d06174 authored by Jim Fulton's avatar Jim Fulton

Added debug methods so that, after a problem is found,

we can rerun the tests and catch exceptions witha debugger.
parent 1e717490
......@@ -185,6 +185,11 @@ class TestCase:
finally:
result.stopTest(self)
def debug(self):
self.setUp()
self.__testMethod()
self.tearDown()
def assert_(self, expr, msg=None):
"""Equivalent of built-in 'assert', but is not optimised out when
__debug__ is false.
......@@ -272,6 +277,10 @@ class TestSuite:
test(result)
return result
def debug(self):
for test in self._tests: test.debug()
class FunctionTestCase(TestCase):
"""A test case that wraps a test function.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment