Skip to content

Commit 705ca02

Browse files
Fix the pythoninfo Tests (#183)
(fixes #182)
1 parent e0b4dd1 commit 705ca02

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyperformance/tests/test_pythoninfo.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ def test_venv(self):
6565
venv, python, cleanup = tests.create_venv()
6666
self.addCleanup(cleanup)
6767
expected.sys.executable = python
68-
expected.sys._base_executable = os.path.normpath(sys.executable)
69-
expected.base_executable = os.path.normpath(sys.executable)
68+
realpath = os.path.realpath(os.path.normpath(sys.executable))
69+
if os.name == 'nt':
70+
# It isn't a symlink.
71+
expected.executable_realpath = os.path.realpath(python)
72+
expected.sys._base_executable = realpath
73+
expected.base_executable = realpath
7074
expected.sys.prefix = venv
7175
expected.sys.exec_prefix = venv
7276
expected.sys.version_info = tuple(expected.sys.version_info)

0 commit comments

Comments
 (0)