Files
IfcOpenShell/src/ifcopenshell-python/test/bootstrap.py
T

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

21 lines
813 B
Python
Raw Normal View History

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
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")
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")
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()