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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py

Issue 2248653002: Revert of Fix pylint warnings in webkitpy/common/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual Revert (Patch Set 1 causes patch failure in read_checksum_from_png_unittest.py) Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 Google Inc. All rights reserved.
2 # Copyright (C) 2009 Apple Inc. All rights reserved. 2 # Copyright (C) 2009 Apple Inc. All rights reserved.
3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved. 3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 import unittest 31 import unittest
32 32
33 from webkitpy.common.system.executive import Executive, ScriptError 33 from webkitpy.common.system.executive import Executive, ScriptError
34 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 34 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
35 from webkitpy.common.system.filesystem import FileSystem 35 from webkitpy.common.system.filesystem import FileSystem
36 from webkitpy.common.system.filesystem_mock import MockFileSystem 36 from webkitpy.common.system.filesystem_mock import MockFileSystem
37 from webkitpy.common.checkout.scm.detection import detect_scm_system 37 from webkitpy.common.checkout.scm.detection import detect_scm_system
38 from webkitpy.common.checkout.scm.git import AmbiguousCommitError
38 from webkitpy.common.checkout.scm.git import Git 39 from webkitpy.common.checkout.scm.git import Git
40 from webkitpy.common.checkout.scm.scm import SCM
39 41
40 42
41 class SCMTestBase(unittest.TestCase): 43 class SCMTestBase(unittest.TestCase):
42 44
43 def __init__(self, *args, **kwargs): 45 def __init__(self, *args, **kwargs):
44 super(SCMTestBase, self).__init__(*args, **kwargs) 46 super(SCMTestBase, self).__init__(*args, **kwargs)
45 self.scm = None 47 self.scm = None
46 self.executive = None 48 self.executive = None
47 self.fs = None 49 self.fs = None
48 self.original_cwd = None 50 self.original_cwd = None
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800' 255 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800'
254 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T09:55:21Z') 256 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T09:55:21Z')
255 257
256 def test_get_issue_number(self): 258 def test_get_issue_number(self):
257 scm = Git(cwd='.', executive=MockExecutive2(output='Issue number: 12345 (http://crrev.com/12345)')) 259 scm = Git(cwd='.', executive=MockExecutive2(output='Issue number: 12345 (http://crrev.com/12345)'))
258 issue_number = scm.get_issue_number() 260 issue_number = scm.get_issue_number()
259 self.assertEqual(issue_number, '12345') 261 self.assertEqual(issue_number, '12345')
260 scm2 = Git(cwd='.', executive=MockExecutive2(output='Issue number: None (None)')) 262 scm2 = Git(cwd='.', executive=MockExecutive2(output='Issue number: None (None)'))
261 issue_number = scm2.get_issue_number() 263 issue_number = scm2.get_issue_number()
262 self.assertEqual(issue_number, 'None') 264 self.assertEqual(issue_number, 'None')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698