Skip to content

Commit

Permalink
TEST: assert
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Oct 18, 2019
1 parent 91b95c5 commit 909f758
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,16 +532,13 @@ def _cleaning_debug(self):
skipped = getattr(self.__class__, "__unittest_skip__", False) or getattr(
testMethod, "__unittest_skip__", False
)
assert not skipped

if not skipped:
self._pre_setup()
self._pre_setup()
try:
super(cls, self).debug()
finally:
# Run _post_teardown also with SkipTest exception, when _pre_setup
# was run.
if not skipped:
self._post_teardown()
self._post_teardown()

orig_debug = cls.debug
cls.debug = _cleaning_debug
Expand Down

0 comments on commit 909f758

Please sign in to comment.