mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 21:38:51 +00:00
Fix ifc2sql test after 9055f14bb9
This commit is contained in:
@@ -34,16 +34,15 @@ from pathlib import Path
|
|||||||
class TestIfc2Sql:
|
class TestIfc2Sql:
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
TEST_FILE = Path(__file__).parent / "files" / "basic.ifc"
|
TEST_FILE = Path(__file__).parent / "files" / "basic.ifc"
|
||||||
tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite")
|
temp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite")
|
||||||
sqlite_path = ifcpatch.execute(
|
sqlite_path = Path(temp.name)
|
||||||
|
ifcpatch.execute(
|
||||||
{
|
{
|
||||||
"file": ifcopenshell.open(TEST_FILE),
|
"file": ifcopenshell.open(TEST_FILE),
|
||||||
"recipe": "Ifc2Sql",
|
"recipe": "Ifc2Sql",
|
||||||
"arguments": ["sqlite", None, None, None, tmp.name],
|
"arguments": ["sqlite", None, None, None, sqlite_path],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
assert isinstance(sqlite_path, str)
|
|
||||||
assert sqlite_path.endswith(".ifcsqlite")
|
|
||||||
|
|
||||||
# Ensure file is valid.
|
# Ensure file is valid.
|
||||||
ifc_sqlite = ifcopenshell.open(sqlite_path)
|
ifc_sqlite = ifcopenshell.open(sqlite_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user