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

TST: completed the scanner test for handling non-string scalars

parent 0e4fca21
No related branches found
No related tags found
2 merge requests!53Release 0.1,!45Scalars in cfood definitions
Pipeline #28981 passed with warnings
......@@ -67,19 +67,20 @@ def test_handle_value():
assert handle_value([4, 3, 2], store) == ([4, 3, 2], "single")
def test_record_structure_generation(crawler):
pass
# Copied from test_tool.py as an example
# subd = crawler.debug_tree[dircheckstr("DataAnalysis")]
# subc = crawler.debug_metadata["copied"][dircheckstr("DataAnalysis")]
# assert len(subd) == 2
# # variables store on Data Analysis node of debug tree
# assert len(subd[0]) == 2
# # record store on Data Analysis node of debug tree
# assert len(subd[1]) == 0
# assert len(subc) == 2
# assert len(subc[0]) == 2
# assert len(subc[1]) == 0
# # The data analysis node creates one variable for the node itself:
# assert subd[0]["DataAnalysis"] == "examples_article/DataAnalysis"
# assert subc[0]["DataAnalysis"] is False
subd = crawler.debug_tree[dircheckstr("DataAnalysis")]
assert len(subd) == 2
# variables store on Data Analysis node of debug tree
assert len(subd[0]) == 3
assert "Data" in subd[0]
assert "DataAnalysis" in subd[0]
assert "RecordThatGetsParentsLater" in subd[0]
prop = subd[0]["RecordThatGetsParentsLater"].get_property("someId")
assert type(prop.value) == int
assert prop.value == 23
# record store on Data Analysis node of debug tree
assert len(subd[1]) == 1
prop2 = subd[0]["RecordThatGetsParentsLater"].get_property("someId")
assert prop == prop2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment