Skip to content

Conversation

@jschueller
Copy link
Contributor

Closes #668

@rossbar
Copy link
Contributor

rossbar commented Dec 2, 2025

Unfortunately I think the fix may be more involved - I cherry-picked this over to #670 to test that it fixes the issue, but the test is still failing. I believe the issue is the test design itself - AFAICT the example_module fixture implicitly expects the tests are run from the source directory rather than pulling paths relative to the install location. This should be fixable with importlib.resources, but I'm having trouble groking the original test intent with the relative paths. @stefmolin @mattgebert any insight?

@stefmolin
Copy link
Contributor

Unfortunately I think the fix may be more involved - I cherry-picked this over to #670 to test that it fixes the issue, but the test is still failing. I believe the issue is the test design itself - AFAICT the example_module fixture implicitly expects the tests are run from the source directory rather than pulling paths relative to the install location. This should be fixable with importlib.resources, but I'm having trouble groking the original test intent with the relative paths. @stefmolin @mattgebert any insight?

It was relative paths so the expected output would be matchable regardless of who ran the tests since it prints the full path. Now that we use the f-string we shouldn't need to keep them relative.

@rossbar
Copy link
Contributor

rossbar commented Dec 3, 2025

I cherry-picked this and included it in #670 so I'll close this. Thanks for the fix @jschueller !

@rossbar rossbar closed this Dec 3, 2025
@jschueller jschueller deleted the sdist branch December 4, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No such file or directory: 'numpydoc/tests/hooks/example_module.py'

3 participants