File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,8 @@ def set_result_file_path(
173173 # Look for another extension for .h5 and .cff files
174174 if key == "" and extension in [".h5" , ".cff" ]:
175175 key = self .guess_second_key (str (filepath ))
176+ if key == "" and extension == ".h5" :
177+ key = "h5dpf"
176178 if key == "" :
177179 self ._api .data_sources_set_result_file_path_utf8 (self , str (filepath ))
178180 else :
Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ def test_set_resultpath_data_sources_cff(server_type):
103103 assert data_sources .result_key == "cas"
104104
105105
106+ def test_auto_key_data_sources_h5dpf (server_type ):
107+ data_sources = dpf .core .DataSources (result_path = "test.h5" , server = server_type )
108+ assert data_sources .result_key == "h5dpf"
109+
110+
106111def test_set_resultpath_data_sources_cfx_res (server_type ):
107112 from ansys .dpf .core import examples
108113
You can’t perform that action at this time.
0 commit comments