Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Signed-off-by: paul.profizi <[email protected]>
  • Loading branch information
PProfizi committed Jun 20, 2024
1 parent 85f6094 commit fdbaa7f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def test_setresultpath_data_sources_no_extension(d3plot_beam, binout_glstat, ser
def test_set_resultpath_data_sources_h5(server_type):
from ansys.dpf.core import examples
cas_h5_file = examples.download_fluent_axial_comp(server=server_type)["cas"][0]
print(cas_h5_file)
data_sources = dpf.core.DataSources(server=server_type)
data_sources.set_result_file_path(cas_h5_file)
assert data_sources.result_key == "cas"
Expand All @@ -71,14 +70,21 @@ def test_set_resultpath_data_sources_h5(server_type):
def test_set_resultpath_data_sources_cff(server_type):
from ansys.dpf.core import examples
cas_h5_file = examples.download_cfx_heating_coil(server=server_type)["cas"]
print(cas_h5_file)
data_sources = dpf.core.DataSources(server=server_type)
data_sources.set_result_file_path(cas_h5_file)
assert data_sources.result_key == "cas"
data_sources = dpf.core.DataSources(result_path=cas_h5_file, server=server_type)
assert data_sources.result_key == "cas"


def test_set_resultpath_data_sources_cfx_res(server_type):
from ansys.dpf.core import examples
res_file = examples.download_cfx_mixing_elbow(server=server_type)
data_sources = dpf.core.DataSources(server=server_type)
data_sources.set_result_file_path(res_file)
assert data_sources.result_key == "cas"


def test_addupstream_data_sources(allkindofcomplexity, server_type):
data_sources = dpf.core.DataSources(server=server_type)
data_sources2 = dpf.core.DataSources(server=server_type)
Expand Down

0 comments on commit fdbaa7f

Please sign in to comment.