Skip to content

Commit

Permalink
adad test to allow for Optional list
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Mar 8, 2024
1 parent df7c2af commit e76f5ff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/unit/tool_util/test_test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def test_assert_legacy_same_as_new_list_style():

def test_nested_asserts():
asserts = to_test_assert_list(NESTED_ASSERT_LIST)
assert len(asserts) == 1
assert len(asserts[0]["children"]) == 2
assert asserts[0]["children"][0]["tag"] == "has_text"
assert asserts[0]["children"][0]["attributes"]["text"] == "a text"
assert asserts[0]["children"][1]["tag"] == "has_text"
assert asserts[0]["children"][1]["attributes"]["text"] == "another text"
assert asserts and len(asserts) == 1
assert asserts and asserts[0]["children"] and len(asserts[0]["children"]) == 2
assert asserts and asserts[0]["children"] and asserts[0]["children"][0]["tag"] == "has_text"
assert asserts and asserts[0]["children"] and asserts[0]["children"][0]["attributes"]["text"] == "a text"
assert asserts and asserts[0]["children"] and asserts[0]["children"][1]["tag"] == "has_text"
assert asserts and asserts[0]["children"] and asserts[0]["children"][1]["attributes"]["text"] == "another text"

0 comments on commit e76f5ff

Please sign in to comment.