diff --git a/src/aria2p/cli/parser.py b/src/aria2p/cli/parser.py index bef5ef8..4993f15 100644 --- a/src/aria2p/cli/parser.py +++ b/src/aria2p/cli/parser.py @@ -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: diff --git a/tests/test_cli.py b/tests/test_cli.py index f0ddc33..9e73734 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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