summaryrefslogtreecommitdiff
path: root/test/handler/test_mypy_handler.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/handler/test_mypy_handler.vader')
-rw-r--r--test/handler/test_mypy_handler.vader29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/handler/test_mypy_handler.vader b/test/handler/test_mypy_handler.vader
index 6e96f3f3..039155a2 100644
--- a/test/handler/test_mypy_handler.vader
+++ b/test/handler/test_mypy_handler.vader
@@ -1,6 +1,8 @@
Before:
Save g:ale_python_mypy_ignore_invalid_syntax
+ Save g:ale_python_mypy_show_notes
+ unlet! g:ale_python_mypy_show_notes
unlet! g:ale_python_mypy_ignore_invalid_syntax
runtime ale_linters/python/mypy.vim
@@ -16,6 +18,8 @@ After:
Execute(The mypy handler should parse lines correctly):
call ale#test#SetFilename('__init__.py')
+ let g:ale_python_mypy_show_notes = 0
+
AssertEqual
\ [
\ {
@@ -69,6 +73,31 @@ Execute(The mypy handler should parse lines correctly):
\ '__init__.py:72:1: warning: Some warning',
\ ])
+Execute(The mypy handler should show notes if enabled):
+ call ale#test#SetFilename('__init__.py')
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 72,
+ \ 'col': 1,
+ \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'),
+ \ 'type': 'I',
+ \ 'text': 'A note',
+ \ },
+ \ ],
+ \ ale_linters#python#mypy#Handle(bufnr(''), [
+ \ '__init__.py:72:1: note: A note',
+ \ ])
+
+ let g:ale_python_mypy_show_notes = 0
+
+ AssertEqual
+ \ [],
+ \ ale_linters#python#mypy#Handle(bufnr(''), [
+ \ '__init__.py:72:1: note: A note',
+ \ ])
+
Execute(The mypy handler should handle Windows names with spaces):
" This test works on Unix, where this is seen as a single filename
silent file C:\\something\\with\ spaces.py