0

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
This commit is contained in:
maruel@chromium.org
2009-04-16 17:54:07 +00:00
parent 06af4690d9
commit e2ea4b285f
2 changed files with 4 additions and 7 deletions

@ -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)

@ -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()