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

Unified Diff: tests/patch_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/owners_unittest.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/patch_test.py
diff --git a/tests/patch_test.py b/tests/patch_test.py
index 76778ea4526cd3dc5ffc1a1d56d7a95f93d5abf4..3286f6bb29c57995aa01e82648c16eb3e4e3ffa3 100755
--- a/tests/patch_test.py
+++ b/tests/patch_test.py
@@ -11,8 +11,7 @@ import posixpath
import sys
import unittest
-ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(0, os.path.join(ROOT_DIR, '..'))
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import patch
from tests.patches_data import GIT, RAW
@@ -92,8 +91,6 @@ class PatchTest(unittest.TestCase):
p, 'foo', GIT.NEW, is_new=True, is_git_diff=True, patchlevel=1)
def testValidSvn(self):
- # pylint: disable=R0201
- # Method could be a function
# Should not throw.
p = patch.FilePatchDiff('chrome/file.cc', RAW.PATCH, [])
lines = RAW.PATCH.splitlines(True)
« no previous file with comments | « tests/owners_unittest.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698