Skip to content

Commit

Permalink
test: ruff in tests for --stdin-filename
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Oct 8, 2024
1 parent 9314a78 commit ca1f93f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/darker/tests/test_main_stdin_filename.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit ca1f93f

Please sign in to comment.