1010
1111def hello( ):
1212\t pass
13+ print("hello"
14+ ,"world"
15+ )
1316
1417import json
1518
@@ -37,8 +40,8 @@ def test_pycodestyle(config):
3740
3841 assert mod_import ['code' ] == 'W391'
3942 assert mod_import ['severity' ] == lsp .DiagnosticSeverity .Warning
40- assert mod_import ['range' ]['start' ] == {'line' : 7 , 'character' : 0 }
41- assert mod_import ['range' ]['end' ] == {'line' : 7 , 'character' : 1 }
43+ assert mod_import ['range' ]['start' ] == {'line' : 10 , 'character' : 0 }
44+ assert mod_import ['range' ]['end' ] == {'line' : 10 , 'character' : 1 }
4245
4346 msg = "E201 whitespace after '('"
4447 mod_import = [d for d in diags if d ['message' ] == msg ][0 ]
@@ -48,6 +51,14 @@ def test_pycodestyle(config):
4851 assert mod_import ['range' ]['start' ] == {'line' : 2 , 'character' : 10 }
4952 assert mod_import ['range' ]['end' ] == {'line' : 2 , 'character' : 14 }
5053
54+ msg = "E128 continuation line under-indented for visual indent"
55+ mod_import = [d for d in diags if d ['message' ] == msg ][0 ]
56+
57+ assert mod_import ['code' ] == 'E128'
58+ assert mod_import ['severity' ] == lsp .DiagnosticSeverity .Warning
59+ assert mod_import ['range' ]['start' ] == {'line' : 5 , 'character' : 1 }
60+ assert mod_import ['range' ]['end' ] == {'line' : 5 , 'character' : 10 }
61+
5162
5263def test_pycodestyle_config (workspace ):
5364 """ Test that we load config files properly.
@@ -74,7 +85,7 @@ def test_pycodestyle_config(workspace):
7485 assert [d for d in diags if d ['code' ] == 'W191' ]
7586
7687 content = {
77- 'setup.cfg' : ('[pycodestyle]\n ignore = W191, E201' , True ),
88+ 'setup.cfg' : ('[pycodestyle]\n ignore = W191, E201, E128 ' , True ),
7889 'tox.ini' : ('' , False )
7990 }
8091
0 commit comments