avoid tearDown and cleanup for unittest debugging

This commit is contained in:
mbyt 2016-08-30 21:55:49 +02:00
parent 8593bb12ee
commit 4eeb475138
1 changed files with 6 additions and 1 deletions

View File

@ -150,7 +150,12 @@ class TestCaseFunction(pytest.Function):
pass
def runtest(self):
self._testcase(result=self)
if self.config.pluginmanager.get_plugin("pdbinvoke") is None:
self._testcase(result=self)
else:
# disables tearDown and cleanups for post mortem debugging
self._testcase.debug()
def _prunetraceback(self, excinfo):
pytest.Function._prunetraceback(self, excinfo)