def addExpectedFailure(self, testName, error, todo): """ Add an expected failure to the reporter. """ _todo = Todo(todo) self._result.addExpectedFailure(self._testCase, error, _todo) return {'success': True}
def test_addUnexpectedSuccess(self): """ L{WorkerReporter.addUnexpectedSuccess} sends a L{managercommands.AddUnexpectedSuccess} command. """ self.workerReporter.addUnexpectedSuccess(self.test, Todo("todo")) self.assertEqual(self.fakeAMProtocol.lastCall, managercommands.AddUnexpectedSuccess)
def test_addExpectedFailure(self): """ C{addExpectedFailure} wraps its test with the provided adapter. """ self.wrappedResult.addExpectedFailure(self, self.getFailure(RuntimeError()), Todo("no reason")) self.assertWrapped(self.wrappedResult, self)
def addExpectedFailure( self, testName: str, error: str, todo: Optional[str] ) -> Dict[str, bool]: """ Add an expected failure to the reporter. """ _todo = Todo(todo) self._result.addExpectedFailure(self._testCase, error, _todo) return {"success": True}
def test_addExpectedFailure(self): """ L{WorkerReporter.addExpectedFailure} sends a L{managercommands.AddExpectedFailure} command. protocol. """ self.workerReporter.addExpectedFailure( self.test, Failure(RuntimeError('error')), Todo('todo')) self.assertEqual(self.fakeAMProtocol.lastCall, managercommands.AddExpectedFailure)
def test_addUnexpectedSuccess(self): """ C{addUnexpectedSuccess} wraps its test with the provided adapter. """ self.wrappedResult.addUnexpectedSuccess(self, Todo("no reason")) self.assertWrapped(self.wrappedResult, self)