diff --git a/HISTORY.rst b/HISTORY.rst index d1a91a2f..05d8ba4c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,8 @@ Unreleased * Add `use_git_change_detection` config (default true) to opt out of git-based detection +* Add `uv.lock`, `poetry.lock`, `Pipfile.lock`, and `pdm.lock` to the list of files copied by default + * Invalidate cached results automatically when result-affecting config fields change diff --git a/src/mutmut/configuration.py b/src/mutmut/configuration.py index 3324e7ba..5d7361df 100644 --- a/src/mutmut/configuration.py +++ b/src/mutmut/configuration.py @@ -132,6 +132,10 @@ def _load_config() -> Config: Path("test/"), Path("setup.cfg"), Path("pyproject.toml"), + Path("uv.lock"), + Path("poetry.lock"), + Path("Pipfile.lock"), + Path("pdm.lock"), ] + list(Path(".").glob("test*.py")), max_stack_depth=s("max_stack_depth", -1), diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 8449fcbc..00192e3c 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -361,3 +361,7 @@ def test_also_copy_includes_defaults(self, in_tmp_dir: Path): assert Path("test/") in config.also_copy assert Path("setup.cfg") in config.also_copy assert Path("pyproject.toml") in config.also_copy + assert Path("uv.lock") in config.also_copy + assert Path("poetry.lock") in config.also_copy + assert Path("Pipfile.lock") in config.also_copy + assert Path("pdm.lock") in config.also_copy