From 323967b9fd9eb86f5caccd7f9fd469377afb3caf Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 28 Feb 2025 11:59:03 +0500 Subject: [PATCH] Fix ifc2sql test after 9055f14bb9 --- src/ifcpatch/test/test_Ifc2Sql.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ifcpatch/test/test_Ifc2Sql.py b/src/ifcpatch/test/test_Ifc2Sql.py index 3d20c8ba97..e5c40fe245 100644 --- a/src/ifcpatch/test/test_Ifc2Sql.py +++ b/src/ifcpatch/test/test_Ifc2Sql.py @@ -34,16 +34,15 @@ from pathlib import Path class TestIfc2Sql: def test_run(self): TEST_FILE = Path(__file__).parent / "files" / "basic.ifc" - tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite") - sqlite_path = ifcpatch.execute( + temp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite") + sqlite_path = Path(temp.name) + ifcpatch.execute( { "file": ifcopenshell.open(TEST_FILE), "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. ifc_sqlite = ifcopenshell.open(sqlite_path)