Skip to content

Commit

Permalink
Implement support for unittest.expectedFailure
Browse files Browse the repository at this point in the history
Fixes issue nose-devs#33
  • Loading branch information
csdev committed Jan 3, 2015
1 parent e2b1749 commit c396b61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nose/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ def addSkip(self, test, reason):
plugins.addError(self.test, (SkipTest, reason, None))
self.result.addSkip(self.test, reason)

def addExpectedFailure(self, test, err):
self.assertMyTest(test)
self.result.addExpectedFailure(self.test, self._prepareErr(err))

def addUnexpectedSuccess(self, test):
self.assertMyTest(test)
self.test.passed = False
self.result.addUnexpectedSuccess(self.test)
if self.config.stopOnError:
self.shouldStop = True

def addSuccess(self, test):
self.assertMyTest(test)
self.plugins.addSuccess(self.test)
Expand Down

0 comments on commit c396b61

Please sign in to comment.