Do not allow pip compile scenario tests to discover other Python versions (#1106)

In https://github.com/astral-sh/puffin/pull/1040 we broke the pip
compile scenarios designed to test failure when a required Python
version is not available — resolution succeeded because all of the
Python versions were available in CI. Following #1105 we have the
ability to isolate tests from Python versions available in the system.
Here, we limit the scenarios to only the Python version in the current
environment, restoring our ability to test the error messages.

With https://github.com/zanieb/packse/pull/95, we will be able to
specify scenarios with access to additional system Python versions. This
will allow us to include test coverage where resolution can succeed by
using a version available elsewhere on the system. See #1111 for this
follow-up.
This commit is contained in:
Zanie Blue
2024-01-26 12:18:15 -06:00
committed by GitHub
parent 21577ad002
commit 91f421cf97
2 changed files with 36 additions and 18 deletions

View File

@@ -69,6 +69,7 @@ fn {{module_name}}() -> Result<()> {
.arg(cache_dir.path())
.env("VIRTUAL_ENV", venv.as_os_str())
.env("PUFFIN_NO_WRAP", "1")
.env("PUFFIN_PYTHON_PATH", "")
.current_dir(&temp_dir), @r###"<snapshot>
"###);
});