Skip to content

Commit 2a14d53

Browse files
fix: Keep switch-to-meshing as hidden to fix Fluent journal replay. (#3792)
* fix: Keep switch-to-meshing as hidden to fix Fluent journal replay. * test: fix * chore: adding changelog file 3792.fixed.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
1 parent dba796c commit 2a14d53

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

doc/changelog.d/3792.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Keep switch-to-meshing as hidden to fix Fluent journal replay.

src/ansys/fluent/core/services/datamodel_tui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def __dir__(self) -> list[str]:
364364
]
365365

366366
def __getattribute__(self, name) -> Any:
367-
if name in ["exit", "switch_to_meshing_mode"] and not self._path:
367+
if name in ["exit"] and not self._path:
368368
raise AttributeError(
369369
f"'{self.__class__.__name__}' object has no attribute '{name}'"
370370
)

tests/test_tui_api.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ def test_exit_not_in_meshing_tui(new_meshing_session):
8686
def test_commands_not_in_solver_tui(new_solver_session):
8787
solver = new_solver_session
8888

89-
for command in ["exit", "switch_to_meshing_mode"]:
89+
deleted_commands = ["exit"]
90+
hidden_commands = ["switch_to_meshing_mode"]
91+
92+
for command in deleted_commands:
9093
assert command not in dir(solver.tui)
9194
with pytest.raises(AttributeError):
9295
getattr(solver.tui, command)
96+
97+
for command in hidden_commands:
98+
assert command not in dir(solver.tui)
99+
assert getattr(solver.tui, command)

0 commit comments

Comments
 (0)