Skip to content

Commit

Permalink
ci: Restore test for invalid args
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 26, 2024
1 parent c9b9ff8 commit dab3ecb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit dab3ecb

Please sign in to comment.