From 083fc74dac7c19a07842f23066467a9b8285f186 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Oct 2021 23:05:01 -0400 Subject: [PATCH] Fix usage of virtualenv to ensure that tests are run in the bare virtualenv. Ref #2764. --- setuptools/tests/test_virtualenv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 399dbaf0bb..462e20c78f 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -45,7 +45,8 @@ def test_clean_env_install(bare_virtualenv, tmp_src): """ Check setuptools can be installed in a clean environment. """ - bare_virtualenv.run(['python', 'setup.py', 'install'], cd=tmp_src) + cmd = [bare_virtualenv.python, 'setup.py', 'install'] + bare_virtualenv.run(cmd, cd=tmp_src) def _get_pip_versions(): @@ -203,5 +204,5 @@ def test_no_missing_dependencies(bare_virtualenv, request): Quick and dirty test to ensure all external dependencies are vendored. """ for command in ('upload',): # sorted(distutils.command.__all__): - cmd = ['python', 'setup.py', command, '-h'] + cmd = [bare_virtualenv.python, 'setup.py', command, '-h'] bare_virtualenv.run(cmd, cd=request.config.rootdir)