move skip detection to afterTest(), otherwise the last test in a suite doesn't get skipped properly

This commit is contained in:
gfxmonk 2012-03-11 17:36:22 +11:00
parent 740082772d
commit 68198c92a4
1 changed files with 4 additions and 2 deletions

View File

@ -111,11 +111,13 @@ class RedNose(nose.plugins.Plugin):
result.stream = FilteringStream(self.stream, BLACKLISTED_WRITERS)
def beforeTest(self, test):
if self._in_test:
self.addSkip()
self._in_test = True
if self.verbose:
self._out(self._format_test_name(test) + ' ... ')
def afterTest(self, test):
if self._in_test:
self.addSkip()
def _print_test(self, type_, color):
self.total += 1