def testRun(self): """Check if test sets result after run""" unitTestMock = mock.Mock(spec=unittest.TestCase) runner = _TestRunner() result = runner.run(unitTestMock) self.assertIsInstance(result, _TestResult) self.assertIn( 'call(<qgistester.test._TestResult run=0 errors=0 failures=0>)', str(unitTestMock.mock_calls[0]))
def testRun(self): """check if test is run setting result.""" # preconditions unitTestMock = mock.Mock(spec=unittest.TestCase) runner = _TestRunner() # do test result = runner.run(unitTestMock) self.assertIsInstance(result, _TestResult) self.assertIn('call(<qgistester.test._TestResult run=0 errors=0 failures=0>)', str(unitTestMock.mock_calls[0]))
def testRun(self): """check if test is run setting result.""" # preconditions unitTestMock = mock.Mock(spec=unittest.TestCase) runner = _TestRunner() # do test result = runner.run(unitTestMock) self.assertIsInstance(result, _TestResult) self.assertIn( 'call(<qgistester.test._TestResult run=0 errors=0 failures=0>)', str(unitTestMock.mock_calls[0]))
def testInit(self): """check if __init__ is correctly executed.""" runner = _TestRunner() self.assertIsInstance(runner, unittest.runner.TextTestRunner)