Skip to content

Commit 61d75fb

Browse files
committed
Add test for pylint plugins
1 parent 4e7450f commit 61d75fb

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

tests/fixtures/pylint/has_errors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ def thing_two(arg1, arg2, arg3):
1212
result=arg1*arg2
1313
if result == arg1:
1414
pass
15+
elif result == '':
16+
pass

tests/fixtures/pylint/sample_rcfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[MASTER]
2+
load-plugins=pylint.extensions.emptystring
3+
14
[MESSAGES CONTROL]
25

36
disable=W0611,

tests/tools/test_pylint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def test_process_files__config(self):
123123
problems = self.problems.all(self.fixtures[1])
124124
eq_([
125125
Comment(filename, 10, 10, "C0301 Line too long (51/50)"),
126-
Comment(filename, 1, 1, "C0302 Too many lines in module (14/3)"),
126+
Comment(filename, 1, 1, "C0302 Too many lines in module (16/3)"),
127127
Comment(filename, 9, 9, "R0913 Too many arguments (3/1)"),
128+
Comment(filename, 15, 15, "C1901 Avoid comparisons to empty string"),
128129
], problems)

0 commit comments

Comments
 (0)