Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: enable test_settings_matching_names #3466

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions tests/test_flobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,7 @@ def test_settings_wild_card_access(new_solver_session) -> None:
)


@pytest.mark.skip("https://github.com/ansys/pyfluent/issues/2792")
@pytest.mark.fluent_version("latest")
@pytest.mark.fluent_version(">=25.1")
def test_settings_matching_names(new_solver_session) -> None:
solver = new_solver_session

Expand All @@ -873,11 +872,12 @@ def test_settings_matching_names(new_solver_session) -> None:
with pytest.raises(AttributeError) as msg:
solver.setup.mod

assert (
msg.value.args[0] == "'setup' object has no attribute 'mod'.\n"
"The most similar names are: models."
assert msg.value.args[0].startswith(
"'setup' object has no attribute 'mod'.\n\n" "The most similar API names are:\n"
)

assert len(msg.value.args[0].split("\n")) > 5

with pytest.raises(ValueError) as msg:
solver.setup.models.viscous.model = "k_epsilon"

Expand All @@ -886,10 +886,6 @@ def test_settings_matching_names(new_solver_session) -> None:
"The most similar names are: k-epsilon."
)

energy_parent = solver.setup._get_parent_of_active_child_names("energy")

assert energy_parent == "\n energy is a child of models \n"


@pytest.mark.codegen_required
@pytest.mark.fluent_version(">=23.2")
Expand Down
Loading