Add an add_options method to the OptionList

In doing so, pretty much make the add_option code into the add_options code,
and then just have add_option call add_options.

See #2507.
This commit is contained in:
Dave Pearson
2023-05-07 17:56:02 +01:00
parent 630f59dbd4
commit b44983e8d4
2 changed files with 30 additions and 10 deletions

View File

@@ -106,6 +106,10 @@ async def test_add_later() -> None:
assert option_list.option_count == 6
option_list.add_option(Option("even more"))
assert option_list.option_count == 7
option_list.add_options(
[Option("more still"), "Yet more options", "so many options!"]
)
assert option_list.option_count == 10
async def test_create_with_duplicate_id() -> None: