Skip to content

Commit ad76c99

Browse files
committed
Use venv instead of virtualenv in test_installation
This eliminates the test dependency on virtualenv by using the standard library venv module instead in test_installation.
1 parent e8c3085 commit ad76c99

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ pre-commit
66
pytest
77
pytest-cov
88
pytest-sugar
9-
virtualenv

test/test_installation.py

Lines changed: 3 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy