Skip to content

Instantly share code, notes, and snippets.

@natea
Created June 22, 2011 11:05
Show Gist options
  • Save natea/1039881 to your computer and use it in GitHub Desktop.
Save natea/1039881 to your computer and use it in GitHub Desktop.
from __future__ import with_statement
from fabric.api import local, settings, abort
from fabric.contrib.console import confirm
def test():
with settings(warn_only=True):
result = local('./manage.py test my_app', capture=True)
if result.failed and not confirm("Tests failed. Continue anyway?"):
abort("Aborting at user request.")
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment