Files
IfcOpenShell/src/ifcopenshell-python/test/api/library/test_add_reference.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
802 B
Python
Raw Normal View History

import test.bootstrap
import ifcopenshell.api
class TestAddReference(test.bootstrap.IFC4):
def test_adding_a_reference(self):
library = ifcopenshell.api.run("library.add_library", self.file, name="Name")
reference = ifcopenshell.api.run("library.add_reference", self.file, library=library)
assert reference.is_a("IfcLibraryReference")
assert reference.ReferencedLibrary == library
class TestAddReferenceIFC2X3(test.bootstrap.IFC2X3):
def test_adding_a_reference(self):
library = ifcopenshell.api.run("library.add_library", self.file, name="Name")
reference = ifcopenshell.api.run("library.add_reference", self.file, library=library)
assert reference.is_a("IfcLibraryReference")
assert library.LibraryReference == (reference,)