-
Notifications
You must be signed in to change notification settings - Fork 79
Consolidate editable and isolated fixtures #1194
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
bbd1934 to
ccde78a
Compare
|
Ahhh, the tests are failing at too long paths? Well that's really annoying. c094c95 should alleviate this issue for a bit, although it makes the path less navigable. |
Signed-off-by: Cristian Le <[email protected]>
a12c12e to
c094c95
Compare
| @pytest.fixture | ||
| def package_simple_pyproject_source_dir( | ||
| tmp_path: Path, monkeypatch: pytest.MonkeyPatch | ||
| def package( |
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.
I see. So this is now not just a factory for a PackageInfo, but takes care of staging the named package sources into a fresh temporary directory and changing into that directory, which imposes the normalized package layout that motivates all of the file moves. Test functions only need to capture the fixture as an argument if they want to check the hashes. I wish I could think of an alternative name to suggest. This is more readable, overall, I think. The parameterization is not intuitive, but the examples are clear.
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.
I wish I could think of an alternative name to suggest.
Always welcome if you have naming candidates.
Test functions only need to capture the fixture as an argument if they want to check the hashes
Could expose some functionality for it to avoid needing to ignore the fixture in parameters, just haven't found a worthy one to do so with.
Signed-off-by: Cristian Le <[email protected]>
A bit of cleanup in preparation for #1193