mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
unify tests for ifc4 and ifc2x3
This commit is contained in:
@@ -25,12 +25,12 @@ class TestAddReference(test.bootstrap.IFC4):
|
||||
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
|
||||
ifc2x3 = self.file.schema == "IFC2X3"
|
||||
if ifc2x3:
|
||||
assert library.LibraryReference == (reference,)
|
||||
else:
|
||||
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,)
|
||||
class TestAddReferenceIFC2X3(test.bootstrap.IFC2X3, TestAddReference):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user