| Index: build/android/pylib/local/device/local_device_test_run_test.py
|
| diff --git a/build/android/pylib/local/device/local_device_test_run_test.py b/build/android/pylib/local/device/local_device_test_run_test.py
|
| index 83a0972e274fc0ab0300e7a6de65246c76dd6bc3..ace70ad1a08da82b1a9bc8f6b036d62d60beef04 100755
|
| --- a/build/android/pylib/local/device/local_device_test_run_test.py
|
| +++ b/build/android/pylib/local/device/local_device_test_run_test.py
|
| @@ -15,6 +15,34 @@ with host_paths.SysPath(host_paths.PYMOCK_PATH):
|
| import mock # pylint: disable=import-error
|
|
|
|
|
| +class SubstituteDeviceRootTest(unittest.TestCase):
|
| +
|
| + def testNoneDevicePath(self):
|
| + self.assertEquals(
|
| + '/fake/device/root',
|
| + local_device_test_run.SubstituteDeviceRoot(
|
| + None, '/fake/device/root'))
|
| +
|
| + def testStringDevicePath(self):
|
| + self.assertEquals(
|
| + '/another/fake/device/path',
|
| + local_device_test_run.SubstituteDeviceRoot(
|
| + '/another/fake/device/path', '/fake/device/root'))
|
| +
|
| + def testListWithNoneDevicePath(self):
|
| + self.assertEquals(
|
| + '/fake/device/root/subpath',
|
| + local_device_test_run.SubstituteDeviceRoot(
|
| + [None, 'subpath'], '/fake/device/root'))
|
| +
|
| + def testListWithoutNoneDevicePath(self):
|
| + self.assertEquals(
|
| + '/another/fake/device/path',
|
| + local_device_test_run.SubstituteDeviceRoot(
|
| + ['/', 'another', 'fake', 'device', 'path'],
|
| + '/fake/device/root'))
|
| +
|
| +
|
| class TestLocalDeviceTestRun(local_device_test_run.LocalDeviceTestRun):
|
|
|
| # pylint: disable=abstract-method
|
|
|