summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 17:54:07 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 17:54:07 +0000
commite2ea4b285f04a3eb9307490216b4d59a666cf105 (patch)
treed301b425132d98c1d927b7027f54927848cdd318
parent06af4690d9fd596bf239a3791380b8c659a16029 (diff)
downloadchromium_src-e2ea4b285f04a3eb9307490216b4d59a666cf105.zip
chromium_src-e2ea4b285f04a3eb9307490216b4d59a666cf105.tar.gz
chromium_src-e2ea4b285f04a3eb9307490216b4d59a666cf105.tar.bz2
REmove one unneeded seam.
Review URL: http://codereview.chromium.org/69019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13853 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xPRESUBMIT.py6
-rwxr-xr-xPRESUBMIT_unittest.py5
2 files changed, 4 insertions, 7 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 4b6c55b..e1b33a8 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -37,10 +37,6 @@ def ReadFile(path):
return contents
-# Seam for unit testing
-_ReadFile = ReadFile
-
-
def CheckChangeOnUpload(input_api, output_api):
# TODO(maruel): max_cols is temporarily disabled. Reenable once the source
# tree is in better shape.
@@ -87,7 +83,7 @@ def LocalChecks(input_api, output_api, max_cols=80):
# Need to read the file ourselves since AffectedFile.NewContents()
# will normalize line endings.
- contents = _ReadFile(path)
+ contents = ReadFile(path)
if '\r' in contents:
cr_files.append(path)
diff --git a/PRESUBMIT_unittest.py b/PRESUBMIT_unittest.py
index 5910213..56e862e 100755
--- a/PRESUBMIT_unittest.py
+++ b/PRESUBMIT_unittest.py
@@ -54,10 +54,11 @@ class PresubmitUnittest(unittest.TestCase):
def MockReadFile(path):
self.failIf(path.endswith('notsource'))
return self.file_contents
- PRESUBMIT._ReadFile = MockReadFile
+ self._ReadFile = PRESUBMIT.ReadFile
+ PRESUBMIT.ReadFile = MockReadFile
def tearDown(self):
- PRESUBMIT._ReadFile = PRESUBMIT.ReadFile
+ PRESUBMIT.ReadFile = self._ReadFile
def testLocalChecks(self):
api = MockInputApi()