2021-08-31 15:44:57 +10:00
|
|
|
import pytest
|
2021-08-31 18:33:52 +10:00
|
|
|
import ifcopenshell
|
2021-08-31 15:44:57 +10:00
|
|
|
import ifcopenshell.api
|
2021-11-10 16:45:16 +11:00
|
|
|
import ifcopenshell.api.owner.settings
|
2021-08-31 15:44:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class IFC4:
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
|
def setup(self):
|
|
|
|
|
self.file = ifcopenshell.api.run("project.create_file")
|
2021-11-10 16:45:16 +11:00
|
|
|
ifcopenshell.api.owner.settings.get_user = lambda ifc: (ifc.by_type("IfcPersonAndOrganization") or [None])[0]
|
|
|
|
|
ifcopenshell.api.owner.settings.get_application = lambda ifc: (ifc.by_type("IfcApplication") or [None])[0]
|
2021-08-31 15:44:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class IFC2X3:
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
|
def setup(self):
|
|
|
|
|
self.file = ifcopenshell.api.run("project.create_file", version="IFC2X3")
|
2021-10-01 11:05:35 +10:00
|
|
|
ifcopenshell.api.owner.settings.get_user = lambda ifc: ifc.createIfcPersonAndOrganization()
|
2021-08-31 15:44:57 +10:00
|
|
|
ifcopenshell.api.owner.settings.get_application = lambda ifc: ifc.createIfcApplication()
|