MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_ifc_sqlite

Function get_ifc_sqlite

src/ifcopenshell-python/test/test_sql.py:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def get_ifc_sqlite() -> ifcopenshell.sqlite:
31 global SQLITE_PATH
32 if SQLITE_PATH is None:
33 tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite")
34 ifc_file = ifcopenshell.open(TEST_FILE)
35 assert isinstance(ifc_file, ifcopenshell.file)
36 patcher = Ifc2Sql.Patcher(ifc_file, database=tmp.name)
37 patcher.patch()
38 SQLITE_PATH = tmp.name
39 ifc_sqlite = ifcopenshell.open(SQLITE_PATH)
40 assert isinstance(ifc_sqlite, ifcopenshell.sqlite)
41 return ifc_sqlite
42
43
44class TestFile:

Callers 5

test_runMethod · 0.85
test_by_idMethod · 0.85
test_by_typeMethod · 0.85
test_getattrMethod · 0.85
test_setattrMethod · 0.85

Calls 2

patchMethod · 0.95
openMethod · 0.80

Tested by

no test coverage detected