From c6c8a0fac50843e1a8d0ce39d32446852f50a4aa Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:34:22 +0300 Subject: [PATCH] test: migrate from tmpdir to tmp_path Thanks @clintonsteiner! --- src/darker/tests/test_command_line.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/darker/tests/test_command_line.py b/src/darker/tests/test_command_line.py index 0d2c79ce3..a9a45759a 100644 --- a/src/darker/tests/test_command_line.py +++ b/src/darker/tests/test_command_line.py @@ -610,11 +610,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]