diff --git a/tests/conftest.py b/tests/conftest.py index 5bfcd8ca8ea..632c1fc78af 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -156,12 +156,17 @@ def model_with_ns(): @pytest.fixture() def fluent_multi_species(): - """Create a data sources with a cas and a dat file of fluent multi-species case.""" - ds = core.DataSources() - files = examples.download_fluent_multi_species() - ds.set_result_file_path(files["cas"], "cas") - ds.add_file_path(files["dat"], "dat") - return ds + """Return a function which creates a data sources + with a cas and a dat file of fluent multi-species case.""" + + def return_ds(server=None): + ds = core.DataSources(server=server) + files = examples.download_fluent_multi_species(server=server) + ds.set_result_file_path(files["cas"], "cas") + ds.add_file_path(files["dat"], "dat") + return ds + + return return_ds @pytest.fixture() diff --git a/tests/test_cff.py b/tests/test_cff.py new file mode 100644 index 00000000000..a47820703a8 --- /dev/null +++ b/tests/test_cff.py @@ -0,0 +1,16 @@ +import pytest +import conftest +from ansys.dpf import core as dpf + + +@pytest.mark.skipif( + not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0, + reason="CFF source operators where not supported before 7.0,", +) +def test_cff_model_grpc_servers(server_type, fluent_multi_species): + ds = fluent_multi_species(server_type) + model = dpf.Model(ds, server=server_type) + print(model) + assert model is not None + m = model.metadata.meshed_region + print(m)