summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-14 10:51:31 +0100
committerw0rp <devw0rp@gmail.com>2017-06-14 10:51:31 +0100
commitf472e04b095565e843490752c0170d32d3ba3ccb (patch)
tree8150af6b59621de012d459e2c2754347f68be1a4 /test/handler
parent6f858590c2adf33a05bc6574c9d18a6e805f2dbd (diff)
downloadale-f472e04b095565e843490752c0170d32d3ba3ccb.zip
#538 - Set some end column indexes for flake8
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_flake8_handler.vader47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/handler/test_flake8_handler.vader b/test/handler/test_flake8_handler.vader
new file mode 100644
index 00000000..15345d89
--- /dev/null
+++ b/test/handler/test_flake8_handler.vader
@@ -0,0 +1,47 @@
+
+Execute(End column indexes should be set for certain errors):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 25,
+ \ 'col': 1,
+ \ 'type': 'W',
+ \ 'end_col': 3,
+ \ 'text': 'F821: undefined name ''foo''',
+ \ },
+ \ {
+ \ 'lnum': 28,
+ \ 'col': 5,
+ \ 'type': 'W',
+ \ 'end_col': 9,
+ \ 'text': 'F405: hello may be undefined, or defined from star imports: x',
+ \ },
+ \ {
+ \ 'lnum': 104,
+ \ 'col': 5,
+ \ 'type': 'W',
+ \ 'end_col': 12,
+ \ 'text': 'F999: ''continue'' not properly in loop',
+ \ },
+ \ {
+ \ 'lnum': 106,
+ \ 'col': 5,
+ \ 'type': 'W',
+ \ 'end_col': 9,
+ \ 'text': 'F999: ''break'' outside loop',
+ \ },
+ \ {
+ \ 'lnum': 109,
+ \ 'col': 5,
+ \ 'type': 'W',
+ \ 'end_col': 8,
+ \ 'text': 'F841: local variable ''test'' is assigned to but never used',
+ \ },
+ \ ],
+ \ ale#handlers#python#HandlePEP8Format(1, [
+ \ 'foo.py:25:1: F821 undefined name ''foo''',
+ \ 'foo.py:28:5: F405 hello may be undefined, or defined from star imports: x',
+ \ 'foo.py:104:5: F999 ''continue'' not properly in loop',
+ \ 'foo.py:106:5: F999 ''break'' outside loop',
+ \ 'foo.py:109:5: F841 local variable ''test'' is assigned to but never used',
+ \ ])