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
|
||||
/dvc
|
||||
/.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
|
||||
# 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:]]))
|
||||
|
||||
Reference in New Issue
Block a user