def test(options=None, integration=1, selenium=1, test_settings=None):
    """
    Runs manage.py tests.

    Usage::

        fab test
        fab test:app
        fab test:app.tests.forms_tests:TestCaseName
        fab test:integration=0
        fab test:selenium=0

    """
    if test_settings is None:
        test_settings = settings.TEST_SETTINGS_PATH
    command = ("coverage run --source='.' manage.py test -v 2" +
               " --failfast --settings={0} --pattern='*_tests.py'".format(
                   test_settings))
    if int(integration) == 0:
        command += " --exclude='integration_tests'"
    if int(selenium) == 0:
        command += " --exclude='selenium_tests'"
    if options:
        command += ' {0}'.format(options)
    with fab_settings(warn_only=True):
        local(command, capture=False)
    local('coverage html -d coverage --omit="{}"'.format(
        settings.COVERAGE_EXCLUDES))
def test ( options = None , integration = 1 , selenium = 1 , test_settings = None ) : if test_settings is None : test_settings = settings . TEST_SETTINGS_PATH command = ( "coverage run --source='.' manage.py test -v 2" + " --failfast --settings={0} --pattern='*_tests.py'" . format ( test_settings ) ) if int ( integration ) == 0 : command += " --exclude='integration_tests'" if int ( selenium ) == 0 : command += " --exclude='selenium_tests'" if options : command += ' {0}' . format ( options ) with fab_settings ( warn_only = True ) : local ( command , capture = False ) local ( 'coverage html -d coverage --omit="{}"' . format ( settings . COVERAGE_EXCLUDES ) )
Runs manage.py tests.

    Usage::

        fab test
        fab test:app
        fab test:app.tests.forms_tests:TestCaseName
        fab test:integration=0
        fab test:selenium=0