Chromium Code Reviews| Index: tests/gclient_scm_test.py |
| diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py |
| index 908b322b2d896e9f6a6cae066391e1b75c6dd650..6fc33a19fcab986f63c1ffc764706bf5bb7b7ea5 100755 |
| --- a/tests/gclient_scm_test.py |
| +++ b/tests/gclient_scm_test.py |
| @@ -5,21 +5,24 @@ |
| """Unit tests for gclient_scm.py.""" |
| -# pylint: disable=E1101,E1103,W0403 |
| +# pylint: disable=E1103 |
| +import logging |
| +import os |
| # Import before super_mox to keep valid references. |
| from os import rename |
| from shutil import rmtree |
| from subprocess import Popen, PIPE, STDOUT |
|
Dirk Pranke
2011/11/09 23:18:47
Nit: I think all of the "from"s are supposed to be
M-A Ruel
2011/11/10 15:38:21
I think http://google-styleguide.googlecode.com/sv
|
| +import sys |
| import tempfile |
| import unittest |
| import __builtin__ |
| -# Fixes include path. |
| -from super_mox import mox, StdoutCheck, TestCaseUtils, SuperMoxTestBase |
| +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
| + |
| +from super_mox import mox, StdoutCheck, SuperMoxTestBase |
| +from super_mox import TestCaseUtils |
| -import logging |
| -import sys |
| import gclient_scm |
| import subprocess2 |
| @@ -30,6 +33,7 @@ join = gclient_scm.os.path.join |
| class GCBaseTestCase(object): |
| def assertRaisesError(self, msg, fn, *args, **kwargs): |
| """Like unittest's assertRaises() but checks for Gclient.Error.""" |
| + # pylint: disable=E1101 |
| try: |
| fn(*args, **kwargs) |
| except gclient_scm.gclient_utils.Error, e: |
| @@ -252,9 +256,8 @@ class SVNWrapperTestCase(BaseTestCase): |
| gclient_scm.os.path.islink(file_path).AndReturn(False) |
| gclient_scm.os.path.isdir(file_path).AndReturn(True) |
| gclient_scm.gclient_utils.RemoveDirectory(file_path) |
| - gclient_scm.os.path.isdir(self.base_path).AndReturn(False) |
| - # The mock is unbound so self is not necessary. |
| # pylint: disable=E1120 |
| + gclient_scm.os.path.isdir(self.base_path).AndReturn(False) |
| gclient_scm.SVNWrapper.update(options, [], ['.']) |
| self.mox.ReplayAll() |