From 6aa4a15abc87f7ce34aced33bb59a8fa0d747335 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Sun, 18 Dec 2022 13:58:43 -0800 Subject: [PATCH] test_sequential: resolve() the system_executable When the _base_executable is a hardlink (macOS homebrew), then the virtualenv `PythonInfo.current_system()` call might not return the same path as tox's PythonInfo.interpreter, even though they would be pointing to the same file. fix issue #2720 --- docs/changelog/2720.bugfix.rst | 2 ++ tests/session/cmd/test_sequential.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/2720.bugfix.rst diff --git a/docs/changelog/2720.bugfix.rst b/docs/changelog/2720.bugfix.rst new file mode 100644 index 000000000..f450e752a --- /dev/null +++ b/docs/changelog/2720.bugfix.rst @@ -0,0 +1,2 @@ +Fix assertion in ``test_result_json_sequential`` when interpreter +``_base_executable`` is a hardlink (macOS homebrew) - by user:`masenf` diff --git a/tests/session/cmd/test_sequential.py b/tests/session/cmd/test_sequential.py index 044e8bc5d..0825110eb 100644 --- a/tests/session/cmd/test_sequential.py +++ b/tests/session/cmd/test_sequential.py @@ -70,7 +70,7 @@ def test_result_json_sequential( py_info = PythonInfo.current_system() host_python = { - "executable": py_info.system_executable, + "executable": str(Path(py_info.system_executable).resolve()), "extra_version_info": None, "implementation": py_info.implementation, "is_64": py_info.architecture == 64,