-
Notifications
You must be signed in to change notification settings - Fork 475
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
Handle definitions @import from relative paths on Windows #1508
Conversation
d4aba76
to
e446a97
Compare
Use provided .testsuite.helpers.require_numpy instead of enclosing tests in an if block.
The GHA workflows appear to run under my fork (neat), so here's a confirmation of the bug occurring on the Windows runners: https://github.com/khaeru/pint/runs/5969710141?check_suite_focus=true#step:9:161 I'll now remove the "TEMPORARY" commits from the branch. |
Now seeing this:
These are the same files; nothing to do with subdirectories. Will experiment further! |
The new Windows jobs now pass: https://github.com/khaeru/pint/runs/5969959860?check_suite_focus=true |
This reverts commit 479bf9d.
Initially as suggested at #1498 (comment), since this continues to affect downstream packages and their CI on Windows.
The actual fix ended up being using pathlib.Path for ImportDefinition.path; this way its str() representation can be compared with those of other Path objects, and they will be consistent on any given OS.
I realized that the pint test suite does not run on Windows; this is one reason the particular manifestation of the bug mentioned at #1498 (comment) was not noticed in #1499. So, I added (probably in the wrong place/form, sorry) a slimmed-down copy of the
test-linux
jobs, namedtest-windows
, to confirm.Happy to make any desired adjustments.
pre-commit run --all-files
with no errorsDocumented in docs/ as appropriateN/A as in Provide a method to iter the definitions in the order they appear #1499