Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)