summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 17:33:13 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 20:51:46 +0100
commit9d312eb542d8634e906508f5bbecb9a10a4da4ee (patch)
treec7822916be81605e648b61c34997fa073c855092
parent8e7db348608194b1b62f8c351f32ba3ac4e896aa (diff)
downloadpylint-git-9d312eb542d8634e906508f5bbecb9a10a4da4ee.tar.gz
Add a test for too much functional files in the same directory
-rw-r--r--tests/test_functional.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py
index aabcb0c1d..61ebc47ab 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -37,6 +37,10 @@ from pylint.utils import HAS_ISORT_5
# TODOs
# - implement exhaustivity tests
+# 'Wet finger' number of files that are reasonable to display by an IDE
+# 'Wet finger' as in 'in my settings there are precisely this many'.
+REASONABLY_DISPLAYABLE_VERTICALLY = 48
+
class LintModuleOutputUpdate(testutils.LintModuleTest):
"""If message files should be updated instead of checked."""
@@ -67,6 +71,11 @@ def get_tests():
for dirpath, _, filenames in os.walk(input_dir):
if dirpath.endswith("__pycache__"):
continue
+
+ assert (
+ len(filenames) <= REASONABLY_DISPLAYABLE_VERTICALLY
+ ), f"{dirpath} contain too much functional tests files."
+
for filename in filenames:
if filename != "__init__.py" and filename.endswith(".py"):
# isort 5 has slightly different rules as isort 4. Testing