Skip to content

Conversation

@LecrisUT
Copy link
Collaborator

A bit of cleanup in preparation for #1193

@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Dec 15, 2025

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.

@pytest.fixture
def package_simple_pyproject_source_dir(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
def package(
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants