summaryrefslogtreecommitdiff
path: root/tests/testutils
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-14 19:44:38 +0100
committerGitHub <noreply@github.com>2023-03-14 19:44:38 +0100
commit1eef2273aee4c5a2e287f7470d6da3a3ae7d0760 (patch)
treecb29286317426645a9e42eb04f66d4cdf31afeb3 /tests/testutils
parent0d463f6e2127b81e2d13c482871f82b4c991f7bd (diff)
downloadpylint-git-1eef2273aee4c5a2e287f7470d6da3a3ae7d0760.tar.gz
[ruff] Add RUF specific rules and autofix (#8449)
Diffstat (limited to 'tests/testutils')
-rw-r--r--tests/testutils/_primer/test_package_to_lint.py3
-rw-r--r--tests/testutils/_primer/test_primer.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/testutils/_primer/test_package_to_lint.py b/tests/testutils/_primer/test_package_to_lint.py
index 220e2c0b2..6fce306b3 100644
--- a/tests/testutils/_primer/test_package_to_lint.py
+++ b/tests/testutils/_primer/test_package_to_lint.py
@@ -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..96430f537 100644
--- a/tests/testutils/_primer/test_primer.py
+++ b/tests/testutils/_primer/test_primer.py
@@ -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: