Example #1
0
 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}
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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}
Example #5
0
 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)
Example #6
0
 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)