Skip to content

Commit

Permalink
avoid tearDown and cleanup for unittest debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mbyt committed Aug 30, 2016
1 parent 8593bb1 commit 4eeb475
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion _pytest/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ def stopTest(self, testcase):
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)
Expand Down

0 comments on commit 4eeb475

Please sign in to comment.