-
Notifications
You must be signed in to change notification settings - Fork 11
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
Test wildcards #98
base: main
Are you sure you want to change the base?
Test wildcards #98
Conversation
@@ -148,6 +187,9 @@ def testExtractKeepHPSS(self): | |||
def testExtractCache(self): | |||
self.helperExtractCache('testExtractCache', 'none') | |||
|
|||
def testExtractWildcard(self): |
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.
Do we need a test with HPSS too?
print(output + err) | ||
expected_present = ['Extracting ab2.txt', 'Extracting ab3.txt'] | ||
self.check_strings(cmd, output + err, expected_present, []) | ||
cmd = '{}zstash extract --hpss={} a*'.format(zstash_path, self.hpss_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.
Interestingly, adding double quotes seems to cause a failure and not adding them allows the tests to pass -- the reverse of our experience as users. I believe this is because subprocess.Popen
requires cmd
to be converted to a list and I imagine the conversion encapsulates a*
in quotes. Not sure if there's a way to automate a test in such a way as to use the quotes.
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.
Try using shell=True
? If that doesn't work, perhaps we should just close #96 without adding automated testing.
Add test for wildcards, specifically the scenario presented in #96.