Skip to content

Commit

Permalink
Fix failing CI run due to settings api update. (#1547)
Browse files Browse the repository at this point in the history
Co-authored-by: Your Name <[email protected]>
  • Loading branch information
prmukherj and Your Name authored Apr 18, 2023
1 parent 6b96af3 commit b59ca87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/test_flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest
from util.solver_workflow import new_solver_session_no_transcript # noqa: F401

from ansys.fluent.core.examples import download_file
from ansys.fluent.core.solver import flobject


Expand Down Expand Up @@ -730,6 +731,11 @@ def test_accessor_methods_on_settings_object_types(load_static_mixer_case):
def test_settings_matching_names(new_solver_session_no_transcript) -> None:
solver = new_solver_session_no_transcript

case_path = download_file("elbow_source_terms.cas.h5", "pyfluent/mixing_elbow")
solver.file.read_case(file_name=case_path)

solver.solution.initialization.hybrid_initialize()

with pytest.raises(AttributeError) as msg:
solver.setup.mod

Expand Down
8 changes: 7 additions & 1 deletion tests/test_settings_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
from ansys.fluent.core.examples import download_file


@pytest.mark.dev
@pytest.mark.fluent_231
@pytest.mark.fluent_232
def test_setup_models_viscous_model_settings(new_solver_session) -> None:
solver_session = new_solver_session
assert solver_session.setup.models.viscous.model() == "laminar"
case_path = download_file("elbow_source_terms.cas.h5", "pyfluent/mixing_elbow")
solver_session.file.read_case(file_name=case_path)
solver_session.solution.initialization.hybrid_initialize()
assert solver_session.setup.models.viscous.model() == "k-epsilon"
assert "inviscid" in solver_session.setup.models.viscous.model.get_attr(
"allowed-values"
)
Expand Down

0 comments on commit b59ca87

Please sign in to comment.