Skip to content

Commit 7744984

Browse files
authored
Merge pull request #1664 from EliahKagan/venv
Use venv instead of virtualenv in test_installation
2 parents f14be1b + ad76c99 commit 7744984

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: test-requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ pre-commit
66
pytest
77
pytest-cov
88
pytest-sugar
9-
virtualenv

Diff for: test/test_installation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import ast
55
import os
66
import subprocess
7+
import sys
8+
79
from git.compat import is_win
810
from test.lib import TestBase
911
from test.lib.helper import with_rw_directory
@@ -12,7 +14,7 @@
1214
class TestInstallation(TestBase):
1315
def setUp_venv(self, rw_dir):
1416
self.venv = rw_dir
15-
subprocess.run(["virtualenv", self.venv], stdout=subprocess.PIPE)
17+
subprocess.run([sys.executable, "-m", "venv", self.venv], stdout=subprocess.PIPE)
1618
bin_name = "Scripts" if is_win else "bin"
1719
self.python = os.path.join(self.venv, bin_name, "python")
1820
self.pip = os.path.join(self.venv, bin_name, "pip")

0 commit comments

Comments
 (0)