From ca1f93fda6ddda6b95d39b993d184c022b17bef9 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:12:03 +0300 Subject: [PATCH] test: ruff in tests for --stdin-filename --- src/darker/tests/test_main_stdin_filename.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/darker/tests/test_main_stdin_filename.py b/src/darker/tests/test_main_stdin_filename.py index 5b1b3bf47..ccc749462 100644 --- a/src/darker/tests/test_main_stdin_filename.py +++ b/src/darker/tests/test_main_stdin_filename.py @@ -135,6 +135,7 @@ expect=0, expect_a_py="original\n", ) +@pytest.mark.parametrize("formatter", [[], ["--formatter=black"], ["--formatter=ruff"]]) def test_main_stdin_filename( git_repo: GitRepoFixture, config_src: Optional[List[str]], @@ -143,6 +144,7 @@ def test_main_stdin_filename( revision: Optional[str], expect: int, expect_a_py: str, + formatter: List[str], ) -> None: """Tests for `darker.__main__.main` and the ``--stdin-filename`` option""" if config_src is not None: @@ -165,7 +167,7 @@ def test_main_stdin_filename( ), raises_if_exception(expect): # end of test setup - retval = darker.__main__.main(arguments) + retval = darker.__main__.main([*formatter, *arguments]) assert retval == expect assert paths["a.py"].read_text() == expect_a_py