diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-09 22:07:20 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-03-28 22:45:45 +0200 |
commit | d738da5b974a3e49a3f70929b3ce4b4b205fe81f (patch) | |
tree | a8f045926ddcb4743ef8f39205d78557e598f29a | |
parent | fa6ef4db33782665c9827a6a6e0697eb16e3a8b7 (diff) | |
download | pylint-git-d738da5b974a3e49a3f70929b3ce4b4b205fe81f.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.txt | 1 | ||||
-rw-r--r-- | tests/messages/func_w0406.txt | 1 | ||||
-rw-r--r-- | tests/test_func.py | 2 |
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 |