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

Unified Diff: tests/scm_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/rietveld_test.py ('k') | tests/subprocess2_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 7564678ecb5ca86c32202bc9a29575b47966d167..2349beb2a0483b62d398499428f48cfe4e67b941 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -5,13 +5,14 @@
"""Unit tests for scm.py."""
-# pylint: disable=E1101,W0403
from __future__ import with_statement
import logging
+import os
import sys
import unittest
-# Fixes include path.
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
from super_mox import SuperMoxTestBase
import fake_repos
@@ -102,11 +103,11 @@ class SVNTestCase(BaseSCMTestCase):
self.compareMembers(scm.SVN, members)
def testGetCheckoutRoot(self):
+ # pylint: disable=E1103
self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo')
self.mox.StubOutWithMock(scm, 'GetCasedPath')
scm.os.path.abspath = lambda x: x
scm.GetCasedPath = lambda x: x
- # pylint: disable=E1103
scm.SVN.CaptureInfo(self.root_dir + '/foo/bar').AndReturn({
'Repository Root': 'svn://svn.chromium.org/chrome',
'URL': 'svn://svn.chromium.org/chrome/trunk/src',
« no previous file with comments | « tests/rietveld_test.py ('k') | tests/subprocess2_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698