Skip to content
Snippets Groups Projects
Commit e9218711 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

TST: corrected failing unit test

parent a532cb43
No related branches found
No related tags found
1 merge request!53Release 0.1
Pipeline #29195 passed with warnings
...@@ -295,7 +295,7 @@ extroot3: !macro ...@@ -295,7 +295,7 @@ extroot3: !macro
assert cfood["extroot3"]["test_four"] is None assert cfood["extroot3"]["test_four"] is None
@pytest.mark.xfail(reason="Fix multiple usage of the same macro.") # @pytest.mark.xfail(reason="Fix multiple usage of the same macro.")
def test_use_macro_twice(): def test_use_macro_twice():
"""Test that the same macro can be used twice with different parameters in """Test that the same macro can be used twice with different parameters in
the same CFood element if the name depends on the parameters. the same CFood element if the name depends on the parameters.
...@@ -318,14 +318,13 @@ metadata: ...@@ -318,14 +318,13 @@ metadata:
--- ---
extroot: !macro extroot: !macro
test_twice: test_twice:
macro_name: once - macro_name: once
test_twice: - macro_name: twice
macro_name: twice
a: 5 a: 5
test_twice: - {}
""") """)
for name in ["once", "twice", "default_name"]: for name in ["once", "twice", "default_name"]:
assert name in cfood["extroot"] assert name in cfood["extroot"]
assert cfood["extroot"]["once"]["something"]["a"] == 4 assert cfood["extroot"]["once"]["something"]["a"] == "4"
assert cfood["extroot"]["twice"]["something"]["a"] == 5 assert cfood["extroot"]["twice"]["something"]["a"] == "5"
assert cfood["extroot"]["default_name"]["something"]["a"] == 4 assert cfood["extroot"]["default_name"]["something"]["a"] == "4"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment