fix linked ifc visibility toggle tests

This commit is contained in:
Andrej730
2024-03-25 12:17:38 +05:00
parent 54fefb3684
commit f0dde4f825
4 changed files with 53 additions and 13 deletions
+15
View File
@@ -397,6 +397,21 @@ def the_collection_name_exists(name) -> bpy.types.Collection:
return obj
@then(parsers.parse('the collection "{name}" exists in viewlayer'))
def the_collection_exists_in_viewlayer(name: str) -> bpy.types.LayerCollection:
col = the_collection_name_exists(name)
layer = tool.Blender.get_layer_collection(col)
if not layer:
assert False, f'The collection "{name}" is not present in the current viewlayer'
return layer
@then(parsers.parse('the collection "{name}" exclude status is "{exclude}"'))
def the_collection_exclude_status_is(name: str, exclude: str) -> None:
layer = the_collection_exists_in_viewlayer(name)
assert layer.exclude == (exclude == "True")
@then(parsers.parse('the object "{name1}" and "{name2}" are different elements'))
def the_object_name1_and_name2_are_different_elements(name1, name2):
ifc = an_ifc_file_exists()