summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-09 22:07:20 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-14 19:48:30 +0100
commit258f26c02655d162bc3afe6fe9edefbecb3c08a4 (patch)
treebd9c04a49ba83b6585f90134348b42f7ff356aab
parentbac894e11a423cca091a03ae01e2b08e9988dec7 (diff)
downloadpylint-git-258f26c02655d162bc3afe6fe9edefbecb3c08a4.tar.gz
Migrate func_w406.py to new functional tests
-rw-r--r--tests/functional/i/import_itself.py (renamed from tests/input/func_w0406.py)4
-rw-r--r--tests/functional/i/import_itself.txt1
-rw-r--r--tests/messages/func_w0406.txt1
-rw-r--r--tests/test_func.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/input/func_w0406.py b/tests/functional/i/import_itself.py
index ceb12b5ff..becd529d7 100644
--- a/tests/input/func_w0406.py
+++ b/tests/functional/i/import_itself.py
@@ -1,10 +1,10 @@
"""test module importing itself"""
# pylint: disable=no-absolute-import,using-constant-test
from __future__ import print_function
-from . import func_w0406
+from . import import_itself # [import-self]
__revision__ = 0
if __revision__:
- print(func_w0406)
+ print(import_itself)
diff --git a/tests/functional/i/import_itself.txt b/tests/functional/i/import_itself.txt
new file mode 100644
index 000000000..4dd361096
--- /dev/null
+++ b/tests/functional/i/import_itself.txt
@@ -0,0 +1 @@
+import-self:4:0::Module import itself
diff --git a/tests/messages/func_w0406.txt b/tests/messages/func_w0406.txt
deleted file mode 100644
index f6bc14db2..000000000
--- a/tests/messages/func_w0406.txt
+++ /dev/null
@@ -1 +0,0 @@
-W: 4: Module import itself
diff --git a/tests/test_func.py b/tests/test_func.py
index 59c467d13..646371899 100644
--- a/tests/test_func.py
+++ b/tests/test_func.py
@@ -120,7 +120,7 @@ def gen_tests(filter_rgx):
tests.append((module_file, messages_file, dependencies))
if UPDATE_FILE.exists():
return tests
- assert len(tests) < 13, "Please do not add new test cases here." + "\n".join(
+ assert len(tests) < 12, "Please do not add new test cases here." + "\n".join(
str(k) for k in tests if not k[2]
)
return tests