diff options
author | w0rp <devw0rp@gmail.com> | 2018-02-18 09:44:04 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-02-18 09:44:04 +0000 |
commit | 5972b9722370e95f48382fc1d696d17a9fa30c85 (patch) | |
tree | c0d1391519782b7617568d1a95d803d8e242c41e /test/handler | |
parent | fcb7932d7d61cda142da7597c9df4da4847f0ca8 (diff) | |
download | ale-5972b9722370e95f48382fc1d696d17a9fa30c85.zip |
#476 Make F401 a warning and E112 a syntax error
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_flake8_handler.vader | 30 | ||||
-rw-r--r-- | test/handler/test_pycodestyle_handler.vader | 15 |
2 files changed, 45 insertions, 0 deletions
diff --git a/test/handler/test_flake8_handler.vader b/test/handler/test_flake8_handler.vader index 492941c9..efacdfb2 100644 --- a/test/handler/test_flake8_handler.vader +++ b/test/handler/test_flake8_handler.vader @@ -214,3 +214,33 @@ Execute(Disabling trailing blank line warnings should work): \ ale_linters#python#flake8#Handle(bufnr(''), [ \ 'foo.py:6:1: W391 blank line at end of file', \ ]) + +Execute(F401 should be a warning): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'F401', + \ 'type': 'W', + \ 'text': 'module imported but unused', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: F401 module imported but unused', + \ ]) + +Execute(E112 should be a syntax error): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'E112', + \ 'type': 'E', + \ 'text': 'expected an indented block', + \ }, + \ ], + \ ale_linters#python#flake8#Handle(bufnr(''), [ + \ 'foo.py:6:1: E112 expected an indented block', + \ ]) diff --git a/test/handler/test_pycodestyle_handler.vader b/test/handler/test_pycodestyle_handler.vader index 0fd885d6..3664455e 100644 --- a/test/handler/test_pycodestyle_handler.vader +++ b/test/handler/test_pycodestyle_handler.vader @@ -137,3 +137,18 @@ Execute(Disabling trailing blank line warnings should work): \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ \ 'foo.py:6:1: W391 blank line at end of file', \ ]) + +Execute(E112 should be a syntax error): + AssertEqual + \ [ + \ { + \ 'lnum': 6, + \ 'col': 1, + \ 'code': 'E112', + \ 'type': 'E', + \ 'text': 'expected an indented block', + \ }, + \ ], + \ ale_linters#python#pycodestyle#Handle(bufnr(''), [ + \ 'foo.py:6:1: E112 expected an indented block', + \ ]) |