summaryrefslogtreecommitdiff
path: root/tests/config
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-05-05 14:17:14 +0200
committerGitHub <noreply@github.com>2022-05-05 14:17:14 +0200
commit9b4cb5a8ffd65734f733d13ae012348b6d7d080f (patch)
tree7d678547152db2b670622e38cf20e8633b285406 /tests/config
parent52b88986932f77761e724fde9dc19fc4f0d1054e (diff)
downloadpylint-git-9b4cb5a8ffd65734f733d13ae012348b6d7d080f.tar.gz
Regression tests for setup.cfg's options using the wrong section failing silently (#6335)
* Regression tests for #4272 Closes #4272. The problem was fixed during the migration from optparse to argparse. Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.cfg7
-rw-r--r--tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.result.json5
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.cfg b/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.cfg
new file mode 100644
index 000000000..d362b5eb7
--- /dev/null
+++ b/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.cfg
@@ -0,0 +1,7 @@
+# Test for the behaviour of https://github.com/PyCQA/pylint/issues/4272
+[pylint.NOTMASTER]
+load-plugins=pylint.extensions.bad_builtin
+[pylint.MASTER]
+persistent=no
+[pylint.DEPRECATED_BUILTINS]
+bad-functions=print,map
diff --git a/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.result.json b/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.result.json
new file mode 100644
index 000000000..22469120b
--- /dev/null
+++ b/tests/config/functional/setup_cfg/issue_4272/option_in_wrong_section.result.json
@@ -0,0 +1,5 @@
+{
+ "load_plugins": ["pylint.extensions.bad_builtin"],
+ "persistent": false,
+ "bad_functions": ["print", "map"]
+}