mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
chore: remove bin dir and simplify tests.__main__ (#8507)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
/tests
|
/tests
|
||||||
/dvc
|
/dvc
|
||||||
/.github
|
/.github
|
||||||
/bin
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
@echo OFF
|
|
||||||
set PYTHONPATH=%DVC_HOME%
|
|
||||||
python -m dvc %*
|
|
||||||
+4
-18
@@ -1,20 +1,6 @@
|
|||||||
# Needs investigation, pylint was running tests
|
if __name__ == "__main__":
|
||||||
# Could be `pylint_pytest` plugin, skipping check for this file for now
|
import sys
|
||||||
# pylint: skip-file
|
|
||||||
|
|
||||||
import os
|
import pytest
|
||||||
import sys
|
|
||||||
from subprocess import check_call
|
|
||||||
|
|
||||||
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
sys.exit(pytest.main(["-v", "-n=auto", *sys.argv[1:]]))
|
||||||
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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user