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

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

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 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 19 matching lines...) Expand all
30 30
31 import unittest 31 import unittest
32 32
33 from .detection import SCMDetector 33 from .detection import SCMDetector
34 from webkitpy.common.system.filesystem_mock import MockFileSystem 34 from webkitpy.common.system.filesystem_mock import MockFileSystem
35 from webkitpy.common.system.executive_mock import MockExecutive 35 from webkitpy.common.system.executive_mock import MockExecutive
36 from webkitpy.common.system.outputcapture import OutputCapture 36 from webkitpy.common.system.outputcapture import OutputCapture
37 37
38 38
39 class SCMDetectorTest(unittest.TestCase): 39 class SCMDetectorTest(unittest.TestCase):
40
40 def test_detect_scm_system(self): 41 def test_detect_scm_system(self):
41 filesystem = MockFileSystem() 42 filesystem = MockFileSystem()
42 executive = MockExecutive(should_log=True) 43 executive = MockExecutive(should_log=True)
43 detector = SCMDetector(filesystem, executive) 44 detector = SCMDetector(filesystem, executive)
44 45
45 expected_logs = """\ 46 expected_logs = """\
46 MOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/ 47 MOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/
47 """ 48 """
48 scm = OutputCapture().assert_outputs(self, detector.detect_scm_system, [ "/"], expected_logs=expected_logs) 49 scm = OutputCapture().assert_outputs(self, detector.detect_scm_system, [ "/"], expected_logs=expected_logs)
49 self.assertIsNone(scm) 50 self.assertIsNone(scm)
50 # FIXME: This should make a synthetic tree and test Git detection in tha t tree. 51 # FIXME: This should make a synthetic tree and test Git detection in tha t tree.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698