Skip to content

Commit cc3adad

Browse files
committed
Don't use virtualenv internals in tests
1 parent 5e072e2 commit cc3adad

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/lib/venv.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import compileall
22
import shutil
3+
import subprocess
34
import sys
45
import textwrap
56
import venv as _venv
@@ -55,11 +56,16 @@ def _create(self, clear=False):
5556
else:
5657
# Create a new virtual environment.
5758
if self._venv_type == "virtualenv":
58-
_virtualenv.create_environment(
59-
self.location,
60-
no_pip=True,
61-
no_wheel=True,
62-
no_setuptools=True,
59+
subprocess.check_call(
60+
[
61+
sys.executable,
62+
"-m",
63+
"virtualenv",
64+
"--no-pip",
65+
"--no-wheel",
66+
"--no-setuptools",
67+
str(self.location),
68+
]
6369
)
6470
self._fix_virtualenv_site_module()
6571
elif self._venv_type == "venv":

0 commit comments

Comments
 (0)