summaryrefslogtreecommitdiff
path: root/test/handler/test_mypy_handler.vader
blob: e1b1562d9cd9f8ebf20346e10be245f3aac82f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Before:
  runtime ale_linters/python/mypy.vim

After:
  call ale#linter#Reset()

Execute(The mypy handler should parse lines correctly):
  AssertEqual
  \ [
  \   {
  \     'lnum': 4,
  \     'col': 0,
  \     'text': "No library stub file for module 'django.db'",
  \     'type': 'E',
  \   },
  \   {
  \     'lnum': 40,
  \     'col': 5,
  \     'text': "Some other problem",
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#python#mypy#Handle(347, [
  \   "file.py:4: error: No library stub file for module 'django.db'",
  \   'file.py:4: note: (Stub files are from https://github.com/python/typeshed)',
  \   "file.py:40:5: error: Some other problem",
  \ ])

Execute(The mypy handler should handle Windows names with spaces):
  AssertEqual
  \ [
  \   {
  \     'lnum': 4,
  \     'col': 0,
  \     'text': "No library stub file for module 'django.db'",
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#python#mypy#Handle(347, [
  \   "C:\something\with spaces.py:4: error: No library stub file for module 'django.db'",
  \ ])