Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 8869502

Browse files
committed
fix test for pylint 1.9.5 false negative
1 parent 4bb09c9 commit 8869502

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_regression.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pylint
12
import pytest
23
from base_tester import BasePytestFixtureChecker
34

@@ -10,5 +11,10 @@ class TestRegression(BasePytestFixtureChecker):
1011
def test_import_twice(self, enable_plugin):
1112
'''catch a coding error when using fixture + if + inline import'''
1213
self.run_linter(enable_plugin)
13-
self.verify_messages(2, msg_id='unused-import')
14+
15+
if int(pylint.__version__.split('.')[0]) < 2:
16+
# for some reason pylint 1.9.5 does not raise unused-import for inline import
17+
self.verify_messages(1, msg_id='unused-import')
18+
else:
19+
self.verify_messages(2, msg_id='unused-import')
1420
self.verify_messages(1, msg_id='redefined-outer-name')

0 commit comments

Comments
 (0)