mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
You can now associate annotations with objects for smart annotations in IFC. See #1153.
This commit is contained in:
@@ -41,3 +41,27 @@ class TestEditText:
|
||||
drawing.update_text_value("obj").should_be_called()
|
||||
drawing.disable_editing_text("obj").should_be_called()
|
||||
subject.edit_text(ifc, drawing, obj="obj")
|
||||
|
||||
|
||||
class TestEnableEditingTextProduct:
|
||||
def test_run(self, drawing):
|
||||
drawing.enable_editing_text_product("obj").should_be_called()
|
||||
drawing.import_text_product("obj").should_be_called()
|
||||
subject.enable_editing_text_product(drawing, obj="obj")
|
||||
|
||||
|
||||
class TestDisableEditingTextProduct:
|
||||
def test_run(self, drawing):
|
||||
drawing.disable_editing_text_product("obj").should_be_called()
|
||||
subject.disable_editing_text_product(drawing, obj="obj")
|
||||
|
||||
|
||||
class TestEditTextProduct:
|
||||
def test_run(self, ifc, drawing):
|
||||
ifc.get_entity("obj").should_be_called().will_return("element")
|
||||
drawing.get_text_product("element").should_be_called().will_return("existing_product")
|
||||
ifc.run("drawing.unassign_product", relating_product="existing_product", related_object="element").should_be_called()
|
||||
ifc.run("drawing.assign_product", relating_product="product", related_object="element").should_be_called()
|
||||
drawing.update_text_value("obj").should_be_called()
|
||||
drawing.disable_editing_text_product("obj").should_be_called()
|
||||
subject.edit_text_product(ifc, drawing, obj="obj", product="product")
|
||||
|
||||
Reference in New Issue
Block a user