Skip to content
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

Merged

Conversation

btimbermont
Copy link
Contributor

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.

@btimbermont btimbermont linked an issue Nov 19, 2024 that may be closed by this pull request
Copy link

@rdvdijk rdvdijk left a 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.)')
Copy link

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
Copy link

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?

Copy link
Contributor Author

@btimbermont btimbermont Nov 19, 2024

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 :)

Copy link
Contributor

@Carly-1 Carly-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@btimbermont btimbermont merged commit 3e7bf8e into main Nov 19, 2024
3 checks passed
class TestAdbDevice(unittest.TestCase):

@parameterized.expand([
('/sdcard/test.txt', './foo', 'pull /sdcard/test.txt ./foo'),
Copy link

@Marcel-NFI Marcel-NFI Nov 21, 2024

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'

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pull files where there is a space in the folder name
5 participants