mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
use sys.executable instead of hardcoded python (#5763)
Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
This commit is contained in:
co-authored by
Saugat Pachhai
parent
7b25a9de24
commit
19d0b2af56
+2
-2
@@ -14,7 +14,7 @@ os.putenv(
|
||||
)
|
||||
os.putenv("DVC_HOME", REPO_ROOT)
|
||||
|
||||
opts = "-v -n=auto --dist loadscope --cov=dvc --durations=0"
|
||||
params = " ".join(sys.argv[1:])
|
||||
|
||||
cmd = f"pytest -v -n=auto --dist loadscope --cov=dvc --durations=0 {params}"
|
||||
cmd = f"{sys.executable} -m pytest {opts} {params}"
|
||||
check_call(cmd, shell=True)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def test_no_remote_imports():
|
||||
@@ -15,7 +16,7 @@ def test_no_remote_imports():
|
||||
|
||||
code = "import dvc.main, sys; print(' '.join(sys.modules))"
|
||||
res = subprocess.run(
|
||||
["python", "-c", code], stdout=subprocess.PIPE, check=True
|
||||
[sys.executable, "-c", code], stdout=subprocess.PIPE, check=True
|
||||
)
|
||||
modules = res.stdout.decode().split()
|
||||
assert not set(modules) & remote_modules
|
||||
|
||||
Reference in New Issue
Block a user