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

Unified Diff: build/android/devil/devil_env_test.py

Issue 1770943003: [Android] Remove chromium version of devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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
« no previous file with comments | « build/android/devil/devil_env.py ('k') | build/android/devil/pylintrc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/devil_env_test.py
diff --git a/build/android/devil/devil_env_test.py b/build/android/devil/devil_env_test.py
deleted file mode 100755
index fcb5b3d30d14f19f5b834cee9efe642ec814a4a9..0000000000000000000000000000000000000000
--- a/build/android/devil/devil_env_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# pylint: disable=protected-access
-
-import logging
-import sys
-import unittest
-
-from devil import devil_env
-
-_sys_path_before = list(sys.path)
-with devil_env.SysPath(devil_env.PYMOCK_PATH):
- _sys_path_with_pymock = list(sys.path)
- import mock # pylint: disable=import-error
-_sys_path_after = list(sys.path)
-
-class DevilEnvTest(unittest.TestCase):
-
- def testSysPath(self):
- self.assertEquals(_sys_path_before, _sys_path_after)
- self.assertEquals(
- _sys_path_before + [devil_env.PYMOCK_PATH],
- _sys_path_with_pymock)
-
- def testGetEnvironmentVariableConfig_configType(self):
- with mock.patch('os.environ.get',
- mock.Mock(side_effect=lambda _env_var: None)):
- env_config = devil_env._GetEnvironmentVariableConfig()
- self.assertEquals('BaseConfig', env_config.get('config_type'))
-
- def testGetEnvironmentVariableConfig_noEnv(self):
- with mock.patch('os.environ.get',
- mock.Mock(side_effect=lambda _env_var: None)):
- env_config = devil_env._GetEnvironmentVariableConfig()
- self.assertEquals({}, env_config.get('dependencies'))
-
- def testGetEnvironmentVariableConfig_adbPath(self):
- def mock_environment(env_var):
- return '/my/fake/adb/path' if env_var == 'ADB_PATH' else None
-
- with mock.patch('os.environ.get',
- mock.Mock(side_effect=mock_environment)):
- env_config = devil_env._GetEnvironmentVariableConfig()
- self.assertEquals(
- {
- 'adb': {
- 'file_info': {
- 'linux2_x86_64': {
- 'local_paths': ['/my/fake/adb/path'],
- },
- },
- },
- },
- env_config.get('dependencies'))
-
-
-if __name__ == '__main__':
- logging.getLogger().setLevel(logging.DEBUG)
- unittest.main(verbosity=2)
« no previous file with comments | « build/android/devil/devil_env.py ('k') | build/android/devil/pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698