Loading adb/tests/test_adb.py +17 −0 Original line number Diff line number Diff line #!/usr/bin/env python2 # -*- coding: utf-8 -*- """Simple conformance test for adb. This script will use the available adb in path and run simple Loading Loading @@ -336,6 +338,21 @@ class AdbBasic(unittest.TestCase): self.assertEqual(1, status_code) self.assertIn("error", output) def test_unicode_paths(self): """Ensure that we can support non-ASCII paths, even on Windows.""" adb = AdbWrapper() name = u'로보카 폴리'.encode('utf-8') # push. tf = tempfile.NamedTemporaryFile("wb", suffix=name) adb.push(tf.name, "/data/local/tmp/adb-test-{}".format(name)) # pull. adb.shell("rm \"'/data/local/tmp/adb-test-*'\"".format(name)) adb.shell("touch \"'/data/local/tmp/adb-test-{}'\"".format(name)) tf = tempfile.NamedTemporaryFile("wb", suffix=name) adb.pull("/data/local/tmp/adb-test-{}".format(name), tf.name) class AdbFile(unittest.TestCase): SCRATCH_DIR = "/data/local/tmp" Loading Loading
adb/tests/test_adb.py +17 −0 Original line number Diff line number Diff line #!/usr/bin/env python2 # -*- coding: utf-8 -*- """Simple conformance test for adb. This script will use the available adb in path and run simple Loading Loading @@ -336,6 +338,21 @@ class AdbBasic(unittest.TestCase): self.assertEqual(1, status_code) self.assertIn("error", output) def test_unicode_paths(self): """Ensure that we can support non-ASCII paths, even on Windows.""" adb = AdbWrapper() name = u'로보카 폴리'.encode('utf-8') # push. tf = tempfile.NamedTemporaryFile("wb", suffix=name) adb.push(tf.name, "/data/local/tmp/adb-test-{}".format(name)) # pull. adb.shell("rm \"'/data/local/tmp/adb-test-*'\"".format(name)) adb.shell("touch \"'/data/local/tmp/adb-test-{}'\"".format(name)) tf = tempfile.NamedTemporaryFile("wb", suffix=name) adb.pull("/data/local/tmp/adb-test-{}".format(name), tf.name) class AdbFile(unittest.TestCase): SCRATCH_DIR = "/data/local/tmp" Loading