summaryrefslogtreecommitdiff
path: root/tests/config
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-06-04 15:38:12 +0200
committerGitHub <noreply@github.com>2022-06-04 15:38:12 +0200
commit8a9aa134b142a54362162478a83fdffb3dfdb5c0 (patch)
treebe7f87df0aa38d662cbd09c72c422c6d61073dad /tests/config
parentae415b9add252d3c25e92a6008dae33880500ca3 (diff)
downloadpylint-git-8a9aa134b142a54362162478a83fdffb3dfdb5c0.tar.gz
[bad-option-value] Use the right confidence and refactor message (#6829)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/functional/ini/pylintrc_with_deleted_message.2.out6
-rw-r--r--tests/config/functional/ini/pylintrc_with_missing_comma.2.out4
-rw-r--r--tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out2
-rw-r--r--tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out4
-rw-r--r--tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out4
-rw-r--r--tests/config/test_config.py2
6 files changed, 11 insertions, 11 deletions
diff --git a/tests/config/functional/ini/pylintrc_with_deleted_message.2.out b/tests/config/functional/ini/pylintrc_with_deleted_message.2.out
index 27b7d35be..bbd33e9b8 100644
--- a/tests/config/functional/ini/pylintrc_with_deleted_message.2.out
+++ b/tests/config/functional/ini/pylintrc_with_deleted_message.2.out
@@ -1,4 +1,4 @@
************* Module {abspath}
-{relpath}:1:0: E0012: Bad option value for --disable. Don't recognize message buffer-builtin. (bad-option-value)
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message useless-option-value. (bad-option-value)
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message cmp-builtin. (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--disable', expected a valid pylint message and got 'buffer-builtin' (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'useless-option-value' (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'cmp-builtin' (bad-option-value)
diff --git a/tests/config/functional/ini/pylintrc_with_missing_comma.2.out b/tests/config/functional/ini/pylintrc_with_missing_comma.2.out
index fd8761f1f..18078796e 100644
--- a/tests/config/functional/ini/pylintrc_with_missing_comma.2.out
+++ b/tests/config/functional/ini/pylintrc_with_missing_comma.2.out
@@ -1,3 +1,3 @@
************* Module {abspath}
-{relpath}:1:0: E0012: Bad option value for --disable. Don't recognize message logging-not-lazylogging-format-interpolation. (bad-option-value)
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message locally-disabledsuppressed-message. (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--disable', expected a valid pylint message and got 'logging-not-lazylogging-format-interpolation' (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'locally-disabledsuppressed-message' (bad-option-value)
diff --git a/tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out b/tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out
index ddb88ed15..e7d49f428 100644
--- a/tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out
+++ b/tests/config/functional/setup_cfg/do_not_read_other_tools_configuration/setup.2.out
@@ -1,2 +1,2 @@
************* Module {abspath}
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message useless-supression. (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'useless-supression' (bad-option-value)
diff --git a/tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out b/tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out
index fd8761f1f..18078796e 100644
--- a/tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out
+++ b/tests/config/functional/toml/issue_3122/toml_with_missing_comma.2.out
@@ -1,3 +1,3 @@
************* Module {abspath}
-{relpath}:1:0: E0012: Bad option value for --disable. Don't recognize message logging-not-lazylogging-format-interpolation. (bad-option-value)
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message locally-disabledsuppressed-message. (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--disable', expected a valid pylint message and got 'logging-not-lazylogging-format-interpolation' (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'locally-disabledsuppressed-message' (bad-option-value)
diff --git a/tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out b/tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out
index d93533686..b2331660b 100644
--- a/tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out
+++ b/tests/config/functional/toml/unknown_msgid/enable_unknown_msgid.2.out
@@ -1,3 +1,3 @@
************* Module {abspath}
-{relpath}:1:0: E0012: Bad option value for --disable. Don't recognize message logging-not-layzy. (bad-option-value)
-{relpath}:1:0: E0012: Bad option value for --enable. Don't recognize message C00000. (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--disable', expected a valid pylint message and got 'logging-not-layzy' (bad-option-value)
+{relpath}:1:0: E0012: Bad option value for '--enable', expected a valid pylint message and got 'C00000' (bad-option-value)
diff --git a/tests/config/test_config.py b/tests/config/test_config.py
index b1f2279de..45e43a0f5 100644
--- a/tests/config/test_config.py
+++ b/tests/config/test_config.py
@@ -60,7 +60,7 @@ def test_unknown_message_id(capsys: CaptureFixture) -> None:
"""Check that we correctly raise a message on an unknown id."""
Run([str(EMPTY_MODULE), "--disable=12345"], exit=False)
output = capsys.readouterr()
- assert "Command line:1:0: E0012: Bad option value for --disable." in output.out
+ assert "Command line:1:0: E0012: Bad option value for '--disable'" in output.out
def test_unknown_option_name(capsys: CaptureFixture) -> None: