| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import StringIO | 5 import StringIO |
| 6 import unittest | 6 import unittest |
| 7 | 7 |
| 8 from webkitpy.common.system.systemhost_mock import MockSystemHost | 8 from webkitpy.common.system.system_host_mock import MockSystemHost |
| 9 from webkitpy.formatter.main import main | 9 from webkitpy.formatter.main import main |
| 10 | 10 |
| 11 | 11 |
| 12 ACTUAL_INPUT = ''' | 12 ACTUAL_INPUT = ''' |
| 13 def foo(): | 13 def foo(): |
| 14 """triple-quoted docstring""" | 14 """triple-quoted docstring""" |
| 15 try: | 15 try: |
| 16 bar = "bar" | 16 bar = "bar" |
| 17 long_list = ['this is a list of strings that should be wrapped', "and co
nsistently quoted"] | 17 long_list = ['this is a list of strings that should be wrapped', "and co
nsistently quoted"] |
| 18 longer_list = ['this is a list of strings that should be wrapped', "and
consistently quoted", "because it's important to test quoting"] | 18 longer_list = ['this is a list of strings that should be wrapped', "and
consistently quoted", "because it's important to test quoting"] |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 """ | 144 """ |
| 145 ''') | 145 ''') |
| 146 main(host, ['-']) | 146 main(host, ['-']) |
| 147 self.assertMultiLineEqual(host.stdout.getvalue(), ''' | 147 self.assertMultiLineEqual(host.stdout.getvalue(), ''' |
| 148 def f(): | 148 def f(): |
| 149 """This is a docstring | 149 """This is a docstring |
| 150 With extra indentation on this line. | 150 With extra indentation on this line. |
| 151 """ | 151 """ |
| 152 ''') | 152 ''') |
| OLD | NEW |