Backspace everything regarding HDF5

This commit is contained in:
Thomas Krijnen
2026-05-08 16:20:26 +02:00
parent bd436765bf
commit 554c7174e3
66 changed files with 50 additions and 1928 deletions
-20
View File
@@ -17,8 +17,6 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
from pathlib import Path
import bpy
import ifcopenshell
import ifcopenshell.api.style
@@ -55,24 +53,6 @@ class TestLoadExpress(NewFile):
os.remove(schema_path + ".cache.dat")
class TestPurgeHdf5Cache(NewFile):
def test_run(self):
prefs = tool.Blender.get_addon_preferences()
cache_dir = Path(prefs.cache_dir)
test_file = cache_dir / "test.h5"
test_file.parent.mkdir(parents=True, exist_ok=True)
test_file.touch()
# Ensure it can skip currently loaded cache.
loaded_file_path = test_file.with_stem("test_loaded")
loaded_file = open(loaded_file_path, "w")
subject.purge_hdf5_cache()
# On Unix loaded files are not locked.
paths = [loaded_file_path] if os.name == "nt" else []
assert [f for f in cache_dir.iterdir() if f.suffix == ".h5"] == paths
class TestMergeIdenticalObject(NewFile):
def test_merge_identical_styles(self):
tool.Ifc.set(ifc := ifcopenshell.file())