diff options
Diffstat (limited to 'tests/testutils/_primer')
8 files changed, 22 insertions, 21 deletions
diff --git a/tests/testutils/_primer/fixtures/message_changed/expected.txt b/tests/testutils/_primer/fixtures/message_changed/expected.txt index 9640bed9e..676946fd2 100644 --- a/tests/testutils/_primer/fixtures/message_changed/expected.txt +++ b/tests/testutils/_primer/fixtures/message_changed/expected.txt @@ -2,14 +2,14 @@ -**Effect on [astroid](https://github.com/PyCQA/astroid):** +**Effect on [astroid](https://github.com/pylint-dev/astroid):** The following messages are now emitted: <details> 1) locally-disabled: *Locally disabling redefined-builtin [we added some text in the message] (W0622)* -https://github.com/PyCQA/astroid/blob/123456789abcdef/astroid/__init__.py#L91 +https://github.com/pylint-dev/astroid/blob/123456789abcdef/astroid/__init__.py#L91 </details> @@ -19,7 +19,7 @@ The following messages are no longer emitted: 1) locally-disabled: *Locally disabling redefined-builtin (W0622)* -https://github.com/PyCQA/astroid/blob/123456789abcdef/astroid/__init__.py#L91 +https://github.com/pylint-dev/astroid/blob/123456789abcdef/astroid/__init__.py#L91 </details> diff --git a/tests/testutils/_primer/fixtures/message_changed/expected_truncated.txt b/tests/testutils/_primer/fixtures/message_changed/expected_truncated.txt index 3912ea15b..3882b658f 100644 --- a/tests/testutils/_primer/fixtures/message_changed/expected_truncated.txt +++ b/tests/testutils/_primer/fixtures/message_changed/expected_truncated.txt @@ -2,18 +2,18 @@ -**Effect on [astroid](https://github.com/PyCQA/astroid):** +**Effect on [astroid](https://github.com/pylint-dev/astroid):** The following messages are now emitted: <details> 1) locally-disabled: *Locally disabling redefined-builtin [we added some text in the message] (W0622)* -https://github.com/PyCQA/astroid/blob/123456789abcdef/astroid/__init__.py#L91 +https://github.com/pylint-dev/astroid/blob/123456789abcdef/astroid/__init__.py#L91 </details> -The following message... +The followi... *This comment was truncated because GitHub allows only 525 characters in a comment.* diff --git a/tests/testutils/_primer/fixtures/message_changed/main.json b/tests/testutils/_primer/fixtures/message_changed/main.json index 96f0aaaef..69a42be1d 100644 --- a/tests/testutils/_primer/fixtures/message_changed/main.json +++ b/tests/testutils/_primer/fixtures/message_changed/main.json @@ -10,7 +10,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "locally-disabled", "message": "Locally disabling redefined-builtin (W0622)", "message-id": "I0011" @@ -23,7 +23,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "unknown-option-value", "message": "Unknown option value for 'disable', expected a valid pylint message and got 'Ellipsis'", "message-id": "W0012" diff --git a/tests/testutils/_primer/fixtures/message_changed/pr.json b/tests/testutils/_primer/fixtures/message_changed/pr.json index 9e2eda37b..ef7e20fba 100644 --- a/tests/testutils/_primer/fixtures/message_changed/pr.json +++ b/tests/testutils/_primer/fixtures/message_changed/pr.json @@ -10,7 +10,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "locally-disabled", "message": "Locally disabling redefined-builtin [we added some text in the message] (W0622)", "message-id": "I0011" @@ -23,7 +23,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "unknown-option-value", "message": "Unknown option value for 'disable', expected a valid pylint message and got 'Ellipsis'", "message-id": "W0012" diff --git a/tests/testutils/_primer/fixtures/no_change/main.json b/tests/testutils/_primer/fixtures/no_change/main.json index cd361e618..c2f34c750 100644 --- a/tests/testutils/_primer/fixtures/no_change/main.json +++ b/tests/testutils/_primer/fixtures/no_change/main.json @@ -10,7 +10,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "locally-disabled", "message": "Locally disabling redefined-builtin (W0622)", "message-id": "I0011" @@ -23,7 +23,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "unknown-option-value", "message": "Unknown option value for 'disable', expected a valid pylint message and got 'Ellipsis'", "message-id": "W0012" diff --git a/tests/testutils/_primer/fixtures/no_change/pr.json b/tests/testutils/_primer/fixtures/no_change/pr.json index 96f0aaaef..69a42be1d 100644 --- a/tests/testutils/_primer/fixtures/no_change/pr.json +++ b/tests/testutils/_primer/fixtures/no_change/pr.json @@ -10,7 +10,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "locally-disabled", "message": "Locally disabling redefined-builtin (W0622)", "message-id": "I0011" @@ -23,7 +23,7 @@ "column": 0, "endLine": null, "endColumn": null, - "path": "tests/.pylint_primer_tests/PyCQA/astroid/astroid/__init__.py", + "path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/__init__.py", "symbol": "unknown-option-value", "message": "Unknown option value for 'disable', expected a valid pylint message and got 'Ellipsis'", "message-id": "W0012" diff --git a/tests/testutils/_primer/test_package_to_lint.py b/tests/testutils/_primer/test_package_to_lint.py index 220e2c0b2..19645d1eb 100644 --- a/tests/testutils/_primer/test_package_to_lint.py +++ b/tests/testutils/_primer/test_package_to_lint.py @@ -1,6 +1,6 @@ # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE -# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt +# For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE +# Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt from pylint.testutils._primer import PRIMER_DIRECTORY_PATH, PackageToLint @@ -31,7 +31,8 @@ def test_package_to_lint() -> None: expected_args = [ str(expected_path_to_lint), f"--rcfile={expected_pylintrc_path}", - ] + args + *args, + ] assert package_to_lint.pylint_args == expected_args diff --git a/tests/testutils/_primer/test_primer.py b/tests/testutils/_primer/test_primer.py index d57e98d21..076c58a14 100644 --- a/tests/testutils/_primer/test_primer.py +++ b/tests/testutils/_primer/test_primer.py @@ -1,6 +1,6 @@ # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE -# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt +# For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE +# Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt """Test the primer commands. """ from __future__ import annotations @@ -29,7 +29,7 @@ DEFAULT_ARGS = ["python tests/primer/__main__.py", "compare", "--commit=v2.14.2" @pytest.mark.parametrize("args", [[], ["wrong_command"]]) def test_primer_launch_bad_args(args: list[str], capsys: CaptureFixture) -> None: with pytest.raises(SystemExit): - with patch("sys.argv", ["python tests/primer/__main__.py"] + args): + with patch("sys.argv", ["python tests/primer/__main__.py", *args]): Primer(PRIMER_DIRECTORY, PACKAGES_TO_PRIME_PATH).run() out, err = capsys.readouterr() assert not out @@ -84,7 +84,7 @@ class TestPrimer: pr = directory / "pr.json" if expected_file is None: expected_file = directory / "expected.txt" - new_argv = DEFAULT_ARGS + [f"--base-file={main}", f"--new-file={pr}"] + new_argv = [*DEFAULT_ARGS, f"--base-file={main}", f"--new-file={pr}"] with patch("sys.argv", new_argv): Primer(PRIMER_DIRECTORY, PACKAGES_TO_PRIME_PATH).run() with open(PRIMER_DIRECTORY / "comment.txt", encoding="utf8") as f: |