-
Notifications
You must be signed in to change notification settings - Fork 118
TST: Add test to ensure functionality with subdatasets starting with a hyphen (-) #6042
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
Conversation
Codecov Report
@@ Coverage Diff @@
## maint #6042 +/- ##
===========================================
- Coverage 90.22% 35.20% -55.02%
===========================================
Files 312 312
Lines 42157 42158 +1
===========================================
- Hits 38036 14843 -23193
- Misses 4121 27315 +23194
Continue to review full report at Codecov.
|
|
Looks good! Wanna take it out of draft mode? |
|
|
||
| # get | ||
| ds_clone.get('-clone') | ||
| assert_true(dash_clone.is_installed()) | ||
| assert_result_count( | ||
| ds_clone.subdatasets(), 1, path=dash_clone.path, state='present') | ||
|
|
||
| assert_repo_status(ds.path) |
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.
This doesn't seem to serve any purpose, does it? I think this is a remnant of a previous version.
I'll just remove this, alright?
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.
I mean the very last line.
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.
It checks whether any of the above operations have left the original dataset with unsaved modifications. It is certainly not criticial, but also not too expensive, and would make sure that nothing got unexpectedly left behind.
|
FWIW: although I don't mind a dedicated test, I wonder if in the long run we should use the "obscure filename" functionality/constant to ensure that everything (not just a sample of dedicated operations) works on such datasets. $> python -c 'from datalad.tests.utils import OBSCURE_FILENAME; print(repr(OBSCURE_FILENAME))'
' |;&%b5{}\'"ΔЙקم๗あ .datc 'where it starts with the space -- we had issues with not proper quoting of invocations etc. But we could also make a CI run where it would start not with a space but with |
|
Good idea, but I would prefer to not multiplex too much into a single test. Here it is specifically about Git explicitly not being able to work with such a case. It is useful to know that we can deal with it, and that it stays this way. This is related to other obscure names, but not identical or incremental. |
|
FWIW 0.15.2 release did happen! |
Description
Just a test to make sure datalad remains compatible with subdatasets that start with a hyphen.
Checks:
Related Issues
Inspired by #5590