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

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: rebase against HEAD 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
Index: tests/subprocess2_test.py
diff --git a/tests/subprocess2_test.py b/tests/subprocess2_test.py
index cb390751e2c9b47e35c7f42e5ee57394f7371e81..562d2215b1121f9a8e70449b1dd85f46fd99a593 100755
--- a/tests/subprocess2_test.py
+++ b/tests/subprocess2_test.py
@@ -17,14 +17,10 @@ try:
except ImportError:
fcntl = None
-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
-
def convert_to_crlf(string):
"""Unconditionally convert LF to CRLF."""
@@ -84,7 +80,8 @@ class DefaultsTest(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
@@ -98,7 +95,8 @@ class DefaultsTest(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

Powered by Google App Engine
This is Rietveld 408576698