def test_shouldStop(self): """ When result.shouldStop == True, the suite should exit early. """ mock_test = MagicMock() gts = GreenTestSuite(args=default_args) gts._tests = (mock_test,) mock_result = MagicMock() mock_result.shouldStop = True gts.run(mock_result)
def test_shouldStop(self): """ When result.shouldStop == True, the suite should exit early. """ mock_test = MagicMock() gts = GreenTestSuite(args=default_args) gts._tests = (mock_test, ) mock_result = MagicMock() mock_result.shouldStop = True gts.run(mock_result)
def test_failedModuleSetup(self): """ When module setup fails, we skip to the next test. """ mock_test = MagicMock() mock_test.__iter__.side_effect = TypeError gts = GreenTestSuite(args=default_args) gts._tests = (mock_test,) mock_result = MagicMock() mock_result._moduleSetUpFailed = True mock_result.shouldStop = False gts.run(mock_result)
def test_failedModuleSetup(self): """ When module setup fails, we skip to the next test. """ mock_test = MagicMock() mock_test.__iter__.side_effect = TypeError gts = GreenTestSuite(args=default_args) gts._tests = (mock_test, ) mock_result = MagicMock() mock_result._moduleSetUpFailed = True mock_result.shouldStop = False gts.run(mock_result)