diff --git a/tests/test_update.py b/tests/test_update.py index 466d2bc..5f689be 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -14,6 +14,14 @@ def get_env_dirs(name: str): # noqa: D103 return {"argvalues": paths, "ids": [f"{p.parent.name}/{p.name}" for p in paths]} +def test_invalid_args(cmd, tmp_path: Path): + """Run test case on env having valid files, but command argument is invalid.""" + env_path = next((root / "return-0").glob("*")) + shutil.copytree(env_path, tmp_path, dirs_exist_ok=True) + proc: CompletedProcess = cmd("update", "-1") + assert proc.returncode != 0 + + @pytest.mark.parametrize( "env_path", **get_env_dirs("return-1"),