Repository navigation
Update test context to avoid discovery of external Pythons - #4222
Merged
Merged
Conversation
By setting the test search path to an empty path, we avoid accidentally pulling interpreters from the system during a test case
| .arg(self.cache_dir.path()) | ||
| .env("VIRTUAL_ENV", self.venv.as_os_str()) | ||
| .env("UV_NO_WRAP", "1") | ||
| .env("UV_TEST_PYTHON_PATH", "/dev/null") |
Member
There was a problem hiding this comment.
Should we use empty string? Would it be more portable?
Member
Author
There was a problem hiding this comment.
I was worried we might treat an empty string as an empty variable but I guess we don't after looking at the source. Since this passes on Windows CI I think I'd prefer to leave it as-is because the intent is clearer? 🤷♀️
charliermarsh
approved these changes
Jun 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By setting the test search path to an empty path, we avoid accidentally pulling interpreters from the system during a test case.
Cherry-picked from #4214