Skip to content

Commit

Permalink
fix: Fix autoclear commands parsing
Browse files Browse the repository at this point in the history
Issue #128: #128
  • Loading branch information
pawamoy committed Jan 11, 2024
1 parent 282d212 commit 6b7555d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/aria2p/cli/parser.py
Expand Up @@ -39,9 +39,6 @@ def check_args(parser: argparse.ArgumentParser, opts: argparse.Namespace) -> Non
"delete",
"resume",
"start",
"autopurge",
"autoclear",
"autoremove",
)

if opts.subcommand in gid_commands:
Expand Down
6 changes: 6 additions & 0 deletions tests/test_cli.py
Expand Up @@ -298,3 +298,9 @@ def test_show_debug_info(capsys: pytest.CaptureFixture) -> None:
assert "system" in captured
assert "environment" in captured
assert "packages" in captured


@pytest.mark.parametrize("command", ["autoclear", "autopurge", "autoremove"])
def test_cli_autoclear_commands(command: str, tmp_path: Path, port: int) -> None:
with Aria2Server(tmp_path, port, session="very-small-download.txt"):
assert main([command]) == 0

0 comments on commit 6b7555d

Please sign in to comment.