Skip to content

Commit 9753e88

Browse files
authored
fix: Remove exit from settings. (#3300)
1 parent a10e216 commit 9753e88

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/ansys/fluent/core/solver/flobject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,8 @@ def _process_cls_names(info_dict, names, write_doc=False):
20802080
_process_cls_names(children, cls.child_names)
20812081

20822082
commands = info.get("commands")
2083+
if commands:
2084+
commands.pop("exit", None)
20832085
if commands and not user_creatable:
20842086
commands.pop("create", None)
20852087
if commands:

tests/test_settings_api.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ def test_generated_code_special_cases(new_solver_session):
440440
@pytest.mark.fluent_version(">=25.1")
441441
def test_child_alias_with_parent_path(mixing_elbow_settings_session):
442442
solver = mixing_elbow_settings_session
443-
solver.solution.initialization.hybrid_initialize()
443+
solver.settings.solution.initialization.hybrid_initialize()
444444
assert (
445-
solver.setup.models.discrete_phase.numerics.node_based_averaging.kernel._child_aliases
445+
solver.settings.setup.models.discrete_phase.numerics.node_based_averaging.kernel._child_aliases
446446
== {"gaussian_factor": "../gaussian_factor", "option": "../kernel_type"}
447447
)
448448
solver.settings.setup.models.discrete_phase.numerics.node_based_averaging.enabled = (
@@ -470,3 +470,13 @@ def test_child_alias_with_parent_path(mixing_elbow_settings_session):
470470
solver.settings.setup.models.discrete_phase.numerics.node_based_averaging.gaussian_factor()
471471
== 0.6
472472
)
473+
474+
475+
@pytest.mark.fluent_version(">=25.1")
476+
def test_exit_not_in_settings(new_solver_session):
477+
solver = new_solver_session
478+
479+
assert "exit" not in dir(solver.settings)
480+
481+
with pytest.raises(AttributeError):
482+
solver.settings.exit()

0 commit comments

Comments
 (0)