mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Fixing tool tests
This commit is contained in:
@@ -305,6 +305,9 @@ class TestGetDrawingCollection(NewFile):
|
|||||||
collection = bpy.data.collections.new("Collection")
|
collection = bpy.data.collections.new("Collection")
|
||||||
bpy.context.scene.collection.children.link(collection)
|
bpy.context.scene.collection.children.link(collection)
|
||||||
collection.objects.link(obj)
|
collection.objects.link(obj)
|
||||||
|
obj.BIMObjectProperties.collection = collection
|
||||||
|
collection.BIMCollectionProperties.obj = obj
|
||||||
|
|
||||||
element = ifc.createIfcAnnotation()
|
element = ifc.createIfcAnnotation()
|
||||||
tool.Ifc.link(element, obj)
|
tool.Ifc.link(element, obj)
|
||||||
assert subject.get_drawing_collection(element) == collection
|
assert subject.get_drawing_collection(element) == collection
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class TestCreateEmpty(NewFile):
|
|||||||
|
|
||||||
class TestLoadDefaultThumbnails(NewFile):
|
class TestLoadDefaultThumbnails(NewFile):
|
||||||
def test_nothing(self):
|
def test_nothing(self):
|
||||||
pass # Not possible to test this headlessly
|
pass # Not possible to test this headlessly
|
||||||
|
|
||||||
|
|
||||||
class TestRunAggregateAssignObject(NewFile):
|
class TestRunAggregateAssignObject(NewFile):
|
||||||
@@ -93,6 +93,9 @@ class TestSetActiveSpatialElement(NewFile):
|
|||||||
collection = bpy.data.collections.new("Foo")
|
collection = bpy.data.collections.new("Foo")
|
||||||
bpy.context.scene.collection.children.link(collection)
|
bpy.context.scene.collection.children.link(collection)
|
||||||
collection.objects.link(obj)
|
collection.objects.link(obj)
|
||||||
|
obj.BIMObjectProperties.collection = collection
|
||||||
|
collection.BIMCollectionProperties.obj = obj
|
||||||
|
|
||||||
layer = bpy.context.view_layer.layer_collection.children["Foo"]
|
layer = bpy.context.view_layer.layer_collection.children["Foo"]
|
||||||
assert bpy.context.view_layer.active_layer_collection != layer
|
assert bpy.context.view_layer.active_layer_collection != layer
|
||||||
subject.set_active_spatial_element(obj)
|
subject.set_active_spatial_element(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user