diff --git a/.dvcignore b/.dvcignore index 7fab7ecf4..eaa178ec0 100644 --- a/.dvcignore +++ b/.dvcignore @@ -1,4 +1,3 @@ /tests /dvc /.github -/bin diff --git a/bin/dvc b/bin/dvc deleted file mode 100755 index 0fec53adb..000000000 --- a/bin/dvc +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -PYTHONPATH=$DVC_HOME python -m dvc $@ diff --git a/bin/dvc.bat b/bin/dvc.bat deleted file mode 100644 index 3afdaa2e8..000000000 --- a/bin/dvc.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo OFF -set PYTHONPATH=%DVC_HOME% -python -m dvc %* diff --git a/tests/__main__.py b/tests/__main__.py index 25b881838..79fbed045 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -1,20 +1,6 @@ -# Needs investigation, pylint was running tests -# Could be `pylint_pytest` plugin, skipping check for this file for now -# pylint: skip-file +if __name__ == "__main__": + import sys -import os -import sys -from subprocess import check_call + import pytest -REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -os.chdir(REPO_ROOT) - -os.putenv( - "PATH", ":".join([os.path.join(REPO_ROOT, "bin"), os.getenv("PATH")]) -) -os.putenv("DVC_HOME", REPO_ROOT) - -opts = "-v -n=auto --dist loadscope --cov=dvc --durations=50" -params = " ".join(sys.argv[1:]) -cmd = f"{sys.executable} -m pytest {opts} {params}" -check_call(cmd, shell=True) + sys.exit(pytest.main(["-v", "-n=auto", *sys.argv[1:]]))