Fixing tests after 9f7db386a

TestExportTextLiteralAttributes and TestImportTextAttributes was failing because now we're assuming that BoxAlignment will have 1 of values from the list below and not "BoxAlignment"

"top-left", "top-middle", "top-right", "middle-left", "center", "middle-right", "bottom-left", "bottom-middle", "bottom-right"
This commit is contained in:
Andrej730
2023-03-15 19:39:54 +05:00
parent c6d3598c52
commit b55ac88c9d
+3 -3
View File
@@ -207,7 +207,7 @@ class TestExportTextLiteralAttributes(NewFile):
assert subject.export_text_literal_attributes(bpy.data.objects.get("Object")) == {
"Literal": "Literal",
"Path": "RIGHT",
"BoxAlignment": "BoxAlignment",
"BoxAlignment": "bottom-left",
}
@@ -513,7 +513,7 @@ class TestImportTextAttributes(NewFile):
element = ifc.createIfcAnnotation()
element.Representation = ifc.createIfcProductDefinitionShape()
context = ifc.createIfcGeometricRepresentationSubContext(ContextType="Plan", ContextIdentifier="Annotation")
item = ifc.createIfcTextLiteralWithExtent(Literal="Literal", Path="RIGHT", BoxAlignment="BoxAlignment")
item = ifc.createIfcTextLiteralWithExtent(Literal="Literal", Path="RIGHT", BoxAlignment="bottom-left")
representation = ifc.createIfcShapeRepresentation(ContextOfItems=context, Items=[item])
element.Representation.Representations = [representation]
tool.Ifc.link(element, obj)
@@ -521,7 +521,7 @@ class TestImportTextAttributes(NewFile):
props = obj.BIMTextProperties
assert props.attributes.get("Literal").string_value == "Literal"
assert props.attributes.get("Path").enum_value == "RIGHT"
assert props.attributes.get("BoxAlignment").string_value == "BoxAlignment"
assert props.attributes.get("BoxAlignment").string_value == "bottom-left"
class TestImportAssignedProduct(NewFile):