adding support for dicts of lists

This commit is contained in:
evilchili
2023-12-08 14:28:07 -08:00
parent 845dbe1f7a
commit 3fbcb57aca
2 changed files with 36 additions and 9 deletions
+31 -8
View File
@@ -92,26 +92,49 @@ B2:
B3:
"""
fixture_lists = """
fixture_lists_and_dicts = ["""
#
# one two three four
# foo bar baz quz
# category one two three four
# Category foo bar baz quz
#
metadata:
headers:
- category
- one
- two
- three
- four
foo:
- bar:
Category:
- foo:
- bar
- baz
- quz
""", """
#
# category one two three four
# Category foo bar baz quz
#
metadata:
headers:
- category
- one
- two
- three
- four
Category:
foo:
- bar
- baz
- quz
"""
bar:
- a
- b
- c
"""]
def test_lists():
t = tables.RollTable([fixture_lists], die=1)
def test_lists_and_dicts():
t = tables.RollTable(fixture_lists_and_dicts, die=1)
assert str(t)