-
Notifications
You must be signed in to change notification settings - Fork 109
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
BF(TST): make tests use _path_ helper for Windows "friendliness" of the tests #6955
Conversation
…he tests b91b494 simply annotated those tests which were failing on windows to be skipped without considering to fix them. Those tests were failing because hardcoded POSIX path separator (/). Quick solution to have tests fixed is to use _path_ helper around those POSIX paths. The underlying tested code AFAIK should be ok - CI is yet to prove or disprove it. Closes datalad#2564
uff. codespell became "smarter" - we need to account for that (separate PR) |
ha -- current fails look legit -- I will try to update my windows VM license in coming days to troubleshoot:
|
I can replicate the failure on my windows machine |
Codecov Report
@@ Coverage Diff @@
## maint #6955 +/- ##
==========================================
+ Coverage 89.97% 90.96% +0.99%
==========================================
Files 354 354
Lines 46259 46303 +44
==========================================
+ Hits 41622 42120 +498
+ Misses 4637 4183 -454
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thank you @adswa !!! It is as green as it can get ATM, so ready for merge ;) |
…aths test_path_prefix seems to have some genuine failure needing troubleshooting and my Windows license expired and cannot update ATM to troubleshoot. The failures for the other two tests seems to boil down to some special treatment of root (/) path on windows, so we just would make it more correct and explicit by not using _path_ which just assumes that paths are "legit" and would include absolute path properly, with custom _p helper which would prepend C: drive to absolute paths on windows
a87bd90
to
c39a9de
Compare
return pm | ||
return p | ||
|
||
|
||
def test_path_startswith(): |
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.
had to fix up accidentally mass renamed _path_ -> _p_
here ;) tests should pass and then I will merge -- no code changes, just got tests to pass on exotic Windows. What could go wrong?
Co-authored-by: Adina Wagner <adina.wagner@t-online.de>
…fix testing on windows _path_ did not work because, as it was discovered after, it is not doing any magic for "absolute posix paths" like /a/c to turn them into legit windows abs paths. That is what for adhoc _p was introduced here and worked in other tests. With RF to use _p insteadof _path_ test started to pass on Windows.
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.
Now its green! :)
b91b494 simply annotated those tests which were failing on windows to be skipped without
considering to fix them. Those tests were failing because hardcoded POSIX path separator (/).
Quick solution to have tests fixed is to use path helper around those POSIX paths.
The underlying tested code AFAIK should be ok - CI is yet to prove or disprove it.
Closes #2564