diff --git a/agvis/cli.py b/agvis/cli.py index 71a9775..876744d 100644 --- a/agvis/cli.py +++ b/agvis/cli.py @@ -106,7 +106,6 @@ def main(): # Run the command if args.command is None: parser.parse_args(sys.argv.append('--help')) - else: cmd = args.command for fullcmd, aliases in command_aliases.items(): diff --git a/tests/test_cli.py b/tests/test_cli.py index 88f3cdf..c8b6b0a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -60,7 +60,7 @@ def test_agvis_run_invalid_command(monkeypatch, capsys): def mock_subprocess_run(c2, **kwargs): assert c2 == c1 - return subprocess.CompletedProcess(args=c2, returncode=0, stdout=b'', stderr=b'Invalid command') + return subprocess.CompletedProcess(args=c2, stdout=b'', stderr=b'Invalid command') monkeypatch.setattr(subprocess, 'run', mock_subprocess_run)