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

Unified Diff: tests/subprocess2_test.py

Issue 8508017: Standardize the sys.path fix up and fix a few pylint warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Previous patchset was broken Created 9 years, 1 month 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 | « tests/scm_unittest.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/subprocess2_test.py
diff --git a/tests/subprocess2_test.py b/tests/subprocess2_test.py
index 9d30452c3118220135168a934e52d407c0305a3f..54e4e15124ceed59d7622869aa379a52679e50ef 100755
--- a/tests/subprocess2_test.py
+++ b/tests/subprocess2_test.py
@@ -11,14 +11,10 @@ import sys
import time
import unittest
-ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-sys.path.insert(0, ROOT_DIR)
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import subprocess2
-# Method could be a function
-# pylint: disable=R0201
-
class Subprocess2Test(unittest.TestCase):
# Can be mocked in a test.
TO_SAVE = {
@@ -62,7 +58,8 @@ class Subprocess2Test(unittest.TestCase):
assert not results
results.update(kwargs)
results['args'] = args
- def communicate(self):
+ @staticmethod
+ def communicate():
return None, None
subprocess2.Popen = fake_Popen
return results
@@ -76,7 +73,8 @@ class Subprocess2Test(unittest.TestCase):
assert not results
results.update(kwargs)
results['args'] = args
- def communicate(self):
+ @staticmethod
+ def communicate():
return None, None
subprocess2.subprocess.Popen = fake_Popen
return results
« no previous file with comments | « tests/scm_unittest.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698