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

Unified Diff: tests/trychange_unittest.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/subprocess2_test.py ('k') | tests/watchlists_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/trychange_unittest.py
diff --git a/tests/trychange_unittest.py b/tests/trychange_unittest.py
index 12157fdc867c2452efc0d8f989f0ddb1bc5cc694..c7330e13d1fc9384d2bfa315c96a4edd2df41885 100755
--- a/tests/trychange_unittest.py
+++ b/tests/trychange_unittest.py
@@ -5,9 +5,11 @@
"""Unit tests for trychange.py."""
-# pylint: disable=E1103,W0403
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-# Fixes include path.
from super_mox import SuperMoxTestBase
import subprocess2
@@ -91,6 +93,7 @@ class GITUnittest(TryChangeTestsBase):
self.compareMembers(trychange.GIT, members)
def testBasic(self):
+ # pylint: disable=E1103
trychange.os.path.abspath(self.fake_root).AndReturn(self.fake_root)
trychange.scm.GIT.GetCheckoutRoot(self.fake_root).AndReturn(self.fake_root)
trychange.scm.GIT.GetUpstreamBranch(self.fake_root).AndReturn('somewhere')
« no previous file with comments | « tests/subprocess2_test.py ('k') | tests/watchlists_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698