diff --git a/runtimepy/commands/common.py b/runtimepy/commands/common.py index 06410e99..2344b94d 100644 --- a/runtimepy/commands/common.py +++ b/runtimepy/commands/common.py @@ -6,7 +6,7 @@ from argparse import ArgumentParser as _ArgumentParser -def arbiter_args(parser: _ArgumentParser) -> None: +def arbiter_args(parser: _ArgumentParser, nargs: str = "+") -> None: """Add common connection-arbiter parameters..""" parser.add_argument( @@ -14,4 +14,6 @@ def arbiter_args(parser: _ArgumentParser) -> None: action="store_true", help="exit after completing initialization", ) - parser.add_argument("configs", nargs="+", help="the configuration to load") + parser.add_argument( + "configs", nargs=nargs, help="the configuration to load" + ) diff --git a/tests/commands/test_arbiter.py b/tests/commands/test_arbiter.py index c7820e9d..e0b7af9e 100644 --- a/tests/commands/test_arbiter.py +++ b/tests/commands/test_arbiter.py @@ -13,19 +13,14 @@ def test_arbiter_command_basic(): """Test basic usages of the 'arbiter' command.""" - for entry in ["basic.yaml"]: - assert ( - runtimepy_main( - [ - PKG_NAME, - "arbiter", - "--init_only", - str(resource("connection_arbiter", entry)), - ] - ) - == 0 + assert ( + runtimepy_main( + [PKG_NAME, "arbiter", "--init_only", str(resource("empty.yaml"))] ) + == 0 + ) + for entry in ["basic.yaml"]: assert ( runtimepy_main( [ diff --git a/tests/data/valid/empty.yaml b/tests/data/valid/empty.yaml new file mode 100644 index 00000000..ed97d539 --- /dev/null +++ b/tests/data/valid/empty.yaml @@ -0,0 +1 @@ +---