mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-01 20:49:44 +00:00
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:
@@ -207,7 +207,7 @@ class TestExportTextLiteralAttributes(NewFile):
|
|||||||
assert subject.export_text_literal_attributes(bpy.data.objects.get("Object")) == {
|
assert subject.export_text_literal_attributes(bpy.data.objects.get("Object")) == {
|
||||||
"Literal": "Literal",
|
"Literal": "Literal",
|
||||||
"Path": "RIGHT",
|
"Path": "RIGHT",
|
||||||
"BoxAlignment": "BoxAlignment",
|
"BoxAlignment": "bottom-left",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -513,7 +513,7 @@ class TestImportTextAttributes(NewFile):
|
|||||||
element = ifc.createIfcAnnotation()
|
element = ifc.createIfcAnnotation()
|
||||||
element.Representation = ifc.createIfcProductDefinitionShape()
|
element.Representation = ifc.createIfcProductDefinitionShape()
|
||||||
context = ifc.createIfcGeometricRepresentationSubContext(ContextType="Plan", ContextIdentifier="Annotation")
|
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])
|
representation = ifc.createIfcShapeRepresentation(ContextOfItems=context, Items=[item])
|
||||||
element.Representation.Representations = [representation]
|
element.Representation.Representations = [representation]
|
||||||
tool.Ifc.link(element, obj)
|
tool.Ifc.link(element, obj)
|
||||||
@@ -521,7 +521,7 @@ class TestImportTextAttributes(NewFile):
|
|||||||
props = obj.BIMTextProperties
|
props = obj.BIMTextProperties
|
||||||
assert props.attributes.get("Literal").string_value == "Literal"
|
assert props.attributes.get("Literal").string_value == "Literal"
|
||||||
assert props.attributes.get("Path").enum_value == "RIGHT"
|
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):
|
class TestImportAssignedProduct(NewFile):
|
||||||
|
|||||||
Reference in New Issue
Block a user