Skip to content

Instantly share code, notes, and snippets.

@dokkaebi
Created June 24, 2012 01:42
Show Gist options
  • Save dokkaebi/2980960 to your computer and use it in GitHub Desktop.
Save dokkaebi/2980960 to your computer and use it in GitHub Desktop.
fast failing Django test case
class FastFailingTest(TestCase):
"""
A TestCase that stops execution of the suite if it fails.
"""
def run(self, result=None):
if result is None:
result = self.defaultTestResult()
failfast = result.failfast
result.failfast = True
super(A_TestRunnerTest, self).run(result)
result.failfast = failfast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment