Skip to content

Conversation

@rossbar
Copy link
Contributor

@rossbar rossbar commented Oct 18, 2025

The tests/hooks tests are not being run on CI because the tests themselves are not included in the package. The --pyargs pytest flag tells pytest to run the tests on the installed package, so since the hook tests are not included they are not run.

Copy link
Contributor

@mattgebert mattgebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're changing the test suite to make sure the hook tests run, I suggest we add --pre flag for the pre-release install in the testing CI test.yml.

* replace path separators on windows

* Add drive to path for windows
@rossbar rossbar force-pushed the include-hook-tests-in-pkg branch from fe4d9df to 417916e Compare November 11, 2025 21:23
Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
@rossbar rossbar force-pushed the include-hook-tests-in-pkg branch from 157aac6 to 0f38d76 Compare November 11, 2025 21:46
@rossbar
Copy link
Contributor Author

rossbar commented Nov 11, 2025

Apologies all - I was traveling the last couple weeks and didn't have time to get back to this.

I've gone ahead and implemented @mattgebert 's and @stefmolin 's suggestions (thanks for the good ideas!)

Note: I had to revert #655 in this PR as the changes in that PR materially altered the regex so that it was no longer matching file paths on windows. This wasn't caught in the CI for #655 because the hooks tests are not run in the CI (they will be after this PR).

This should now be good to go, and should definitely go in before any modifications to the hooks are made to ensure that any changes are tested!

@mattgebert
Copy link
Contributor

No worries Ross, thanks for getting back to this! Very appreciative of all contributions.

While we're changing the test suite to make sure the hook tests run, I suggest we add --pre flag for the pre-release install in the testing CI test.yml.

Just bumping this ^ as well before someone with write access reviews so we can merge.

@stefmolin
Copy link
Contributor

Apologies all - I was traveling the last couple weeks and didn't have time to get back to this.

I've gone ahead and implemented @mattgebert 's and @stefmolin 's suggestions (thanks for the good ideas!)

Note: I had to revert #655 in this PR as the changes in that PR materially altered the regex so that it was no longer matching file paths on windows. This wasn't caught in the CI for #655 because the hooks tests are not run in the CI (they will be after this PR).

This should now be good to go, and should definitely go in before any modifications to the hooks are made to ensure that any changes are tested!

Now that #655 is reverted, the warnings are back. Can we make sure those are addressed to not regress?

Screenshot 2025-11-11 at 7 17 23 PM

@rossbar
Copy link
Contributor Author

rossbar commented Nov 12, 2025

Now that #655 is reverted, the warnings are back. Can we make sure those are addressed to not regress?

Yes - I tried to figure this out but wasn't able to come up with a regex recipe that worked for the windows filesystems. If someone has a working recipe I'm happy to add it here, otherwise this should be tackled in a followup.

Copy link
Contributor

@stefmolin stefmolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that #655 is reverted, the warnings are back. Can we make sure those are addressed to not regress?

Yes - I tried to figure this out but wasn't able to come up with a regex recipe that worked for the windows filesystems. If someone has a working recipe I'm happy to add it here, otherwise this should be tackled in a followup.

I'm thinking switching to re.escape() would work. Not easy to suggest changes for that here based on how the file is structured, and I don't have a Windows machine to test on, so I will just merge this for now.

Edit: This was indeed the solution. See #660.

@stefmolin stefmolin merged commit ad9391b into numpy:main Nov 13, 2025
26 checks passed
@stefmolin stefmolin added this to the 1.10.0 milestone Nov 13, 2025
@rossbar rossbar deleted the include-hook-tests-in-pkg branch November 13, 2025 19:20
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.

3 participants