Skip to content

Commit 44ec95f

Browse files
committed
Revert "Make tests more accepting"
This reverts commit 6f30ea8.
1 parent 6f30ea8 commit 44ec95f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/test/test_venv.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ def test_sysconfig(self):
301301
self.assertEqual(out.strip(), expected, err)
302302
for attr, expected in (
303303
('executable', self.envpy()),
304-
# Usually compare to sys.prefix, but if we're running in our own
305-
# venv then we really need to compare to our base prefix
306-
('base_prefix', sys.base_prefix),
304+
# Usually compare to sys.executable, but if we're running in our own
305+
# venv then we really need to compare to our base executable
306+
('_base_executable', sys._base_executable),
307307
):
308308
with self.subTest(attr):
309309
cmd[2] = f'import sys; print(sys.{attr})'
@@ -896,10 +896,10 @@ def test_venvwlauncher(self):
896896
exename = exename.replace("python", "pythonw")
897897
envpyw = os.path.join(self.env_dir, self.bindir, exename)
898898
try:
899-
subprocess.check_call([envpyw, "-c", "import fnmatch, sys; "
900-
"assert fnmatch.fnmatch(sys._base_executable, '**/pythonw*.exe')"])
899+
subprocess.check_call([envpyw, "-c", "import sys; "
900+
"assert sys._base_executable.endswith('%s')" % exename])
901901
except subprocess.CalledProcessError:
902-
self.fail("venvwlauncher.exe did not run pythonw.exe")
902+
self.fail("venvwlauncher.exe did not run %s" % exename)
903903

904904

905905
@requireVenvCreate

0 commit comments

Comments
 (0)