From 1224a0de88dd020aa85d485dc12ad3a52cbeb53b Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Sun, 6 Feb 2022 18:53:44 +0200 Subject: [PATCH] Satisfy linters --- src/darker/tests/test_import_sorting.py | 2 ++ src/darker/tests/test_main.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/darker/tests/test_import_sorting.py b/src/darker/tests/test_import_sorting.py index 266574a5f..7f5b3ca9d 100644 --- a/src/darker/tests/test_import_sorting.py +++ b/src/darker/tests/test_import_sorting.py @@ -1,5 +1,7 @@ """Tests for :mod:`darker.import_sorting`""" +# pylint: disable=unused-argument + from importlib import reload from pathlib import Path from textwrap import dedent diff --git a/src/darker/tests/test_main.py b/src/darker/tests/test_main.py index e385ac25d..f77d965fe 100644 --- a/src/darker/tests/test_main.py +++ b/src/darker/tests/test_main.py @@ -38,6 +38,12 @@ def test_isort_option_without_isort(git_repo, caplog): @pytest.fixture def run_isort(git_repo, monkeypatch, caplog, request, find_project_root_cache_clear): + """Fixture for running Darker with requested arguments and a patched `isort` + + Provides an `run_isort.isort_code` mock object which allows checking whether and how + the `isort.code()` function was called. + + """ monkeypatch.chdir(git_repo.root) paths = git_repo.add({"test1.py": "original"}, commit="Initial commit") paths["test1.py"].write_bytes(b"changed")