mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Backspace everything regarding HDF5
This commit is contained in:
@@ -25,9 +25,3 @@ class TestParseExpress:
|
||||
debug.load_express("filename").should_be_called().will_return("schema")
|
||||
debug.add_schema_identifier("schema").should_be_called()
|
||||
subject.parse_express(debug, "filename")
|
||||
|
||||
|
||||
class TestPurgeHdf5Cache:
|
||||
def test_run(self, debug):
|
||||
debug.purge_hdf5_cache().should_be_called()
|
||||
subject.purge_hdf5_cache(debug)
|
||||
|
||||
@@ -24,7 +24,6 @@ from test.core.bootstrap import geometry, ifc, style, surveyor
|
||||
class TestEditObjectPlacement:
|
||||
def predict(self, ifc, geometry, surveyor):
|
||||
ifc.get_entity("obj").should_be_called().will_return("element")
|
||||
geometry.clear_cache("element").should_be_called()
|
||||
geometry.clear_scale("obj").should_be_called()
|
||||
geometry.get_blender_offset_type("obj").should_be_called()
|
||||
surveyor.get_absolute_matrix("obj").should_be_called().will_return("matrix")
|
||||
@@ -197,7 +196,6 @@ class TestSwitchRepresentation:
|
||||
def test_switching_to_a_representation(self, ifc, geometry):
|
||||
geometry.get_object_data("obj").should_be_called().will_return("current_obj_data")
|
||||
ifc.get_entity("obj").should_be_called().will_return("element")
|
||||
geometry.clear_cache("element").should_be_called()
|
||||
geometry.reimport_element_representations("obj", "mapped_rep", apply_openings=True).should_be_called()
|
||||
subject.switch_representation(
|
||||
ifc,
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user