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

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

Issue 1950213002: Remove unused imports in webkitpy with using autoflake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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 10 matching lines...) Expand all
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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 atexit
32 import os
33 import shutil
34 import unittest 31 import unittest
35 32
36 from webkitpy.common.system.executive import Executive, ScriptError 33 from webkitpy.common.system.executive import Executive, ScriptError
37 from webkitpy.common.system.executive_mock import MockExecutive 34 from webkitpy.common.system.executive_mock import MockExecutive
38 from webkitpy.common.system.filesystem import FileSystem 35 from webkitpy.common.system.filesystem import FileSystem
39 from webkitpy.common.system.filesystem_mock import MockFileSystem 36 from webkitpy.common.system.filesystem_mock import MockFileSystem
40 from webkitpy.common.checkout.scm.detection import detect_scm_system 37 from webkitpy.common.checkout.scm.detection import detect_scm_system
41 from webkitpy.common.checkout.scm.git import Git, AmbiguousCommitError 38 from webkitpy.common.checkout.scm.git import AmbiguousCommitError
39 from webkitpy.common.checkout.scm.git import Git
42 from webkitpy.common.checkout.scm.scm import SCM 40 from webkitpy.common.checkout.scm.scm import SCM
43 41
44 42
45 class SCMTestBase(unittest.TestCase): 43 class SCMTestBase(unittest.TestCase):
46 44
47 def __init__(self, *args, **kwargs): 45 def __init__(self, *args, **kwargs):
48 super(SCMTestBase, self).__init__(*args, **kwargs) 46 super(SCMTestBase, self).__init__(*args, **kwargs)
49 self.scm = None 47 self.scm = None
50 self.executive = None 48 self.executive = None
51 self.fs = None 49 self.fs = None
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 scm = self.make_scm() 247 scm = self.make_scm()
250 scm.find_checkout_root = lambda path: '' 248 scm.find_checkout_root = lambda path: ''
251 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000' 249 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000'
252 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T08:05:49Z') 250 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T08:05:49Z')
253 251
254 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130' 252 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130'
255 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-07T23:32:03Z') 253 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-07T23:32:03Z')
256 254
257 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'
258 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')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698