-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add filtering of interpreter names for tests with multiple Python versions #4368
Conversation
.env("UV_TEST_PYTHON_PATH", "/dev/null") | ||
.env("UV_TEST_PYTHON_PATH", &self.python_path()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using multiple Python versions is now "first class" so we can support filtering them.
); | ||
for pattern in Self::path_patterns(executable) { | ||
self.filters | ||
.push_front((format!("{pattern}python.*"), format!("[PYTHON-{version}]"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be in the front or they can get clobbered by other filters. Prompted the change to a double ended data structure.
This feels kind of sloppy but it's blocking work I want to release today. |
b88dbfb
to
7557c99
Compare
0bbbc34
to
6e8cd33
Compare
6e8cd33
to
c62101d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It was becoming problematic that the virtual environment test context diverged from the other one i.e. we had to implement filtering twice. This combines the contexts and tweaks the `TestContext` API and filtering mechanisms for Python versions. Combined with my previous changes to the test context at #4364 and #4368 this finally unblocks the snapshots for test cases in #4360 and #4362.
Extends new filters for interpreter paths to apply to tests with multiple Python versions. Adds patch version filtering for them as well, which is needed for #4360 tests.