diff --git a/.appveyor.yml b/.appveyor.yml index b57a127e9..a1d257cdd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -61,7 +61,7 @@ before_test: - pip install -r test-requirements.txt test_script: - - nosetests --cover-inclusive --cover-erase --cover-package=dvc --with-coverage + - python -mtests after_test: - if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" codecov diff --git a/scripts/ci/script.sh b/scripts/ci/script.sh index 60f50763b..283f7493d 100644 --- a/scripts/ci/script.sh +++ b/scripts/ci/script.sh @@ -3,7 +3,7 @@ set -x set -e -./unittests.sh +python -mtests if [[ "$TRAVIS_PULL_REQUEST" == "false" && \ "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then diff --git a/tests/__main__.py b/tests/__main__.py new file mode 100644 index 000000000..f0cea5e3c --- /dev/null +++ b/tests/__main__.py @@ -0,0 +1,4 @@ +import nose + +if __name__ == '__main__': + nose.main(argv=['--cover-inclusive', '--cover-erase', '--cover-package=dvc', '--with-coverage']) diff --git a/unittests.sh b/unittests.sh deleted file mode 100755 index 31e89d2fc..000000000 --- a/unittests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e - -ulimit -n 2048 - -nosetests --cover-inclusive --cover-erase --cover-package=dvc --with-coverage - -if [ "$1" = "report" ]; then - if [ -z "$CODECLIMATE_REPO_TOKEN" ]; then - echo "Error: CODECLIMATE_REPO_TOKEN is not defined! Reporting faied." - else - codeclimate-test-reporter --token $CODECLIMATE_REPO_TOKEN - fi -fi -