diff options
author | Shahwat Dalal <sdalal29@bloomberg.net> | 2019-04-17 17:52:54 +0100 |
---|---|---|
committer | Chandan Singh <chandan@chandansingh.net> | 2019-04-26 18:15:56 +0000 |
commit | a2ac4e9e298d8387b3dfa56003c63743d032cb10 (patch) | |
tree | 40d6c1a419037effe5688ae98e12243c92e191ad | |
parent | 055ed075f5c0b96d5d3eafd5fe80a3f54fc99ece (diff) | |
download | buildstream-a2ac4e9e298d8387b3dfa56003c63743d032cb10.tar.gz |
tests/testutil/python_repo.py: fixed executable path when running pipfixed-bug-for-pip-test
Using `sys.executable` is a safer option as that is the interpreter
that is currently being used
-rw-r--r-- | tests/testutils/python_repo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/testutils/python_repo.py b/tests/testutils/python_repo.py index 9182bd9ba..fcaf2d293 100644 --- a/tests/testutils/python_repo.py +++ b/tests/testutils/python_repo.py @@ -2,6 +2,7 @@ import os import re import shutil import subprocess +import sys import pytest @@ -90,7 +91,7 @@ def generate_pip_package(tmpdir, pypi, name, version='0.1'): os.chmod(main_file, 0o644) # Run sdist with a fresh process - p = subprocess.run(['python3', 'setup.py', 'sdist'], cwd=tmpdir) + p = subprocess.run([sys.executable, 'setup.py', 'sdist'], cwd=tmpdir) assert p.returncode == 0 # create directory for this package in pypi resulting in a directory |