mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Fix bug where editing then switching to the current representation crashes.
This commit is contained in:
@@ -121,6 +121,15 @@ class TestDoesObjectHaveMeshWithFaces(NewFile):
|
||||
assert subject.does_object_have_mesh_with_faces(obj) is True
|
||||
|
||||
|
||||
class TestDoesRepresentationIdExist(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
tool.Ifc.set(ifc)
|
||||
representation = ifc.createIfcShapeRepresentation()
|
||||
assert subject.does_representation_id_exist(representation.id()) is True
|
||||
assert subject.does_representation_id_exist(12345) is False
|
||||
|
||||
|
||||
class TestDuplicateObjectData(NewFile):
|
||||
def test_run(self):
|
||||
data = bpy.data.meshes.new("Mesh")
|
||||
@@ -160,6 +169,13 @@ class TestGetRepresentationData(NewFile):
|
||||
assert subject.get_representation_data(representation) == data
|
||||
|
||||
|
||||
class TestGetRepresentationId(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
representation = ifc.createIfcShapeRepresentation()
|
||||
assert subject.get_representation_id(representation) == representation.id()
|
||||
|
||||
|
||||
class TestGetRepresentationName(NewFile):
|
||||
def test_run(self):
|
||||
ifc = ifcopenshell.file()
|
||||
|
||||
Reference in New Issue
Block a user