コード例 #1
0
def pytests():
    with safe_cd(SRC):
        my_env = config_pythonpath()
        command = "{0} {1} -m pytest {2}".format(PIPENV, PYTHON,
                                                 "tests").strip()
        print(command)
        execute_with_environment(command, env=my_env)
コード例 #2
0
def docs():
    """
    Docs
    """
    with safe_cd(SRC):
        with safe_cd("docs"):
            my_env = config_pythonpath()
            command = "{0} make html".format(PIPENV).strip()
            print(command)
            execute_with_environment(command, env=my_env)
コード例 #3
0
def coverage():
    """
    Coverage, which is a bit redundant with nose test
    """
    print("Coverage tests always re-run")
    with safe_cd(SRC):
        my_env = config_pythonpath()
        command = "{0} py.test {1} --cov={2} --cov-report html:coverage --cov-fail-under 40  --verbose".format(
            PIPENV, "test", PROJECT_NAME)
        execute_with_environment(command, my_env)
コード例 #4
0
def coverage():
    """
    Do tests exercise enough code?
    """
    print("Coverage tests always re-run")
    with safe_cd(SRC):
        my_env = config_pythonpath()
        command = "{0} py.test {1} --cov={2} --cov-report html:coverage --cov-fail-under 55  --verbose".format(
            PIPENV, "test", PROJECT_NAME
        )
        execute_with_environment(command, my_env)
コード例 #5
0
ファイル: build.py プロジェクト: pombredanne/pypi_librarian
def nose_tests():
    """
    Nose tests
    """
    # with safe_cd(SRC):
    if IS_DJANGO:
        command = "{0} manage.py test -v 2".format(PYTHON)
        # We'd expect this to be MAC or a build server.
        my_env = config_pythonpath()
        execute_with_environment(command, env=my_env)
    else:
        my_env = config_pythonpath()
        if IS_TRAVIS:
            command = "{0} -m nose {1}".format(PYTHON, "test").strip()
        else:
            command = "{0} {1} -m nose {2}".format(PIPENV, PYTHON, "test").strip()
        print(command)
        execute_with_environment(command, env=my_env)