-
Notifications
You must be signed in to change notification settings - Fork 0
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
20 correctly handle spaces in paths, add test, fix release notes #22
20 correctly handle spaces in paths, add test, fix release notes #22
Conversation
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.
Looks good!
@@ -181,7 +186,7 @@ def test_package_versions(self): | |||
|
|||
def test_pull(self): | |||
success_result = MockAdbResult( | |||
stdout='pull successfull! (we don\'t stdout so I can put anything I want here. poop.)') |
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.
😆 💩
@@ -1,6 +1,7 @@ | |||
import subprocess | |||
from os import makedirs | |||
from os.path import basename, isfile | |||
from shlex import quote |
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.
Just checking: shlex
is part of the Python stdlib?
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 is, no extra dependencies needed :)
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.
Looks good :)
class TestAdbDevice(unittest.TestCase): | ||
|
||
@parameterized.expand([ | ||
('/sdcard/test.txt', './foo', 'pull /sdcard/test.txt ./foo'), |
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.
Could you make it more clear what the testcases are? Maybe add a comment or work the testcase into the case. E.g. 'this/is/a/case/with /a/space'
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.
Maybe add a reference to the testcase for this bug?
I went through the code and fixed all parts of the code that handle paths: not just pull, also install and ls.
I added new test code, and created a new ticket to transfer all test code to this new test class.