summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-14 16:40:03 +0100
committerw0rp <devw0rp@gmail.com>2017-06-14 16:40:03 +0100
commit07af1799b1ea43e7fc83374b544bc069a2d306c5 (patch)
tree9a1a5bbb8c7c1aa09f1ba28a3dd6344695d93015 /test
parentf6b0a28cbacba36954cec02bffaee9f126610d69 (diff)
downloadale-07af1799b1ea43e7fc83374b544bc069a2d306c5.zip
#430 Use the style sub_type for flake8 problems
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_flake8_handler.vader22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/handler/test_flake8_handler.vader b/test/handler/test_flake8_handler.vader
index 969d4ec8..7de28275 100644
--- a/test/handler/test_flake8_handler.vader
+++ b/test/handler/test_flake8_handler.vader
@@ -4,7 +4,7 @@ Before:
After:
call ale#linter#Reset()
-Execute(The flake8 handler should handle basic errors):
+Execute(The flake8 handler should handle basic warnings):
AssertEqual
\ [
\ {
@@ -12,10 +12,19 @@ Execute(The flake8 handler should handle basic errors):
\ 'col': 6,
\ 'type': 'E',
\ 'text': 'E111: indentation is not a multiple of four',
+ \ 'sub_type': 'style',
+ \ },
+ \ {
+ \ 'lnum': 7,
+ \ 'col': 6,
+ \ 'type': 'W',
+ \ 'text': 'W123: some warning',
+ \ 'sub_type': 'style',
\ },
\ ],
\ ale_linters#python#flake8#Handle(1, [
\ 'stdin:6:6: E111 indentation is not a multiple of four',
+ \ 'stdin:7:6: W123 some warning',
\ ])
Execute(The flake8 handler should set end column indexes should be set for certain errors):
@@ -24,35 +33,35 @@ Execute(The flake8 handler should set end column indexes should be set for certa
\ {
\ 'lnum': 25,
\ 'col': 1,
- \ 'type': 'W',
+ \ 'type': 'E',
\ 'end_col': 3,
\ 'text': 'F821: undefined name ''foo''',
\ },
\ {
\ 'lnum': 28,
\ 'col': 5,
- \ 'type': 'W',
+ \ 'type': 'E',
\ 'end_col': 9,
\ 'text': 'F405: hello may be undefined, or defined from star imports: x',
\ },
\ {
\ 'lnum': 104,
\ 'col': 5,
- \ 'type': 'W',
+ \ 'type': 'E',
\ 'end_col': 12,
\ 'text': 'F999: ''continue'' not properly in loop',
\ },
\ {
\ 'lnum': 106,
\ 'col': 5,
- \ 'type': 'W',
+ \ 'type': 'E',
\ 'end_col': 9,
\ 'text': 'F999: ''break'' outside loop',
\ },
\ {
\ 'lnum': 109,
\ 'col': 5,
- \ 'type': 'W',
+ \ 'type': 'E',
\ 'end_col': 8,
\ 'text': 'F841: local variable ''test'' is assigned to but never used',
\ },
@@ -110,6 +119,7 @@ Execute (The flake8 handler should handle names with spaces):
\ 'col': 6,
\ 'type': 'E',
\ 'text': 'E111: indentation is not a multiple of four',
+ \ 'sub_type': 'style',
\ },
\ ],
\ ale_linters#python#flake8#Handle(42, [