diff --git a/tests/test_uv.py b/tests/test_uv.py index 183802e..4caead0 100644 --- a/tests/test_uv.py +++ b/tests/test_uv.py @@ -52,6 +52,15 @@ def test_install(self, mock_check_call: MagicMock) -> None: args = mock_check_call.call_args[0][0] assert "uv" in args assert "sync" in args + assert "--no-dev" in args + + @patch("versifier.uv.check_call") + def test_install_with_dev(self, mock_check_call: MagicMock) -> None: + uv = Uv() + uv.install(include_dev_requirements=True) + mock_check_call.assert_called_once() + args = mock_check_call.call_args[0][0] + assert "--no-dev" not in args @patch("versifier.uv.check_call") def test_install_with_extras(self, mock_check_call: MagicMock) -> None: diff --git a/versifier/uv.py b/versifier/uv.py index 2217236..374f2a1 100644 --- a/versifier/uv.py +++ b/versifier/uv.py @@ -58,6 +58,9 @@ def install( ) -> None: commands = [self.uv_path, "sync"] + if not include_dev_requirements: + commands.append("--no-dev") + if extra_requirements: commands.extend(f"--extra={i}" for i in extra_requirements)