Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Unified Diff: tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
diff --git a/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py b/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
index 8849a0d5b66dc8e02cf158aace0e2a7547f82d6e..84edc5c81bfbec3d1ce4d6da6ebd87ec335ab0bd 100644
--- a/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/internal/platform/android_platform_backend_unittest.py
@@ -11,8 +11,8 @@ from telemetry.testing import options_for_unittests
from telemetry.testing import system_stub
import mock
-from pylib.device import battery_utils
-from pylib.device import device_utils
+from devil.android import battery_utils
+from devil.android import device_utils
class AndroidPlatformBackendTest(unittest.TestCase):
def setUp(self):
@@ -57,7 +57,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
'4294967295 1074458624 1074463824 3197495984 3197494152 '
'1074767676 0 4612 0 38136 4294967295 0 0 17 0 0 0 0 0 0 '
'1074470376 1074470912 1102155776\n')
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=proc_stat_content):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('12345'), self._options)
@@ -67,7 +67,7 @@ class AndroidPlatformBackendTest(unittest.TestCase):
@decorators.Disabled('chromeos')
def testGetCpuStatsInvalidPID(self):
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)
@@ -217,7 +217,7 @@ class AndroidPlatformBackendPsutilTest(unittest.TestCase):
android_platform_backend.psutil = psutil
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)
@@ -231,7 +231,7 @@ class AndroidPlatformBackendPsutilTest(unittest.TestCase):
android_platform_backend.psutil = psutil
# Mock an empty /proc/pid/stat.
- with mock.patch('pylib.device.device_utils.DeviceUtils.ReadFile',
+ with mock.patch('devil.android.device_utils.DeviceUtils.ReadFile',
return_value=''):
backend = android_platform_backend.AndroidPlatformBackend(
android_device.AndroidDevice('1234'), self._options)

Powered by Google App Engine
This is Rietveld 408576698