diff --git a/pyperformance/tests/test_pythoninfo.py b/pyperformance/tests/test_pythoninfo.py index 76522ddc..f15e2d31 100644 --- a/pyperformance/tests/test_pythoninfo.py +++ b/pyperformance/tests/test_pythoninfo.py @@ -61,10 +61,12 @@ def test_venv(self): expected = _pythoninfo._build_info(CURRENT) if IS_VENV: python = sys.executable + real_python = os.path.realpath(python) else: venv, python, cleanup = tests.create_venv() + real_python = os.path.realpath(python) self.addCleanup(cleanup) - expected.sys.executable = python + expected.sys.executable = real_python realpath = os.path.realpath(os.path.normpath(sys.executable)) if os.name == 'nt': # It isn't a symlink. @@ -78,7 +80,7 @@ def test_venv(self): ) = tuple(expected.sys.implementation.version) expected.is_venv = True - info = _pythoninfo.get_info(python) + info = _pythoninfo.get_info(real_python) # We have to work around a possible bug. if not info.base_executable: