diff --git a/src/darker/tests/test_command_line.py b/src/darker/tests/test_command_line.py index 7f359f1a4..3b85132b5 100644 --- a/src/darker/tests/test_command_line.py +++ b/src/darker/tests/test_command_line.py @@ -621,11 +621,11 @@ def test_black_options(monkeypatch, tmpdir, git_repo, options, expect): dict(options=["--preview"], expect_opts=["--preview"]), expect_opts=[], ) -def test_ruff_options(monkeypatch, tmpdir, git_repo, options, expect_opts): +def test_ruff_options(monkeypatch, tmp_path, git_repo, options, expect_opts): """Ruff options from the command line are passed correctly to Ruff.""" - monkeypatch.chdir(tmpdir) - (tmpdir / "pyproject.toml").write("[tool.ruff]\n") - (tmpdir / "ruff.cfg").write( + monkeypatch.chdir(tmp_path) + (tmp_path / "pyproject.toml").write_text("[tool.ruff]\n") + (tmp_path / "ruff.cfg").write_text( dedent( """ [tool.ruff]