From a3e3f58319d47dabbca37d59e0033e509dbd294c Mon Sep 17 00:00:00 2001 From: Prithwish Mukherjee <109645853+prmukherj@users.noreply.github.com> Date: Wed, 8 May 2024 10:37:45 +0530 Subject: [PATCH] refactor: Revert datamodel set_state changes. (#2789) --- src/ansys/fluent/core/services/datamodel_se.py | 6 ------ tests/test_meshing_workflow.py | 15 --------------- 2 files changed, 21 deletions(-) diff --git a/src/ansys/fluent/core/services/datamodel_se.py b/src/ansys/fluent/core/services/datamodel_se.py index 74d1d717048..bfb4d535b3c 100644 --- a/src/ansys/fluent/core/services/datamodel_se.py +++ b/src/ansys/fluent/core/services/datamodel_se.py @@ -886,15 +886,9 @@ def set_state(self, state: Optional[Any] = None, **kwargs) -> None: Raises ------ - TypeError - If no arguments are provided to the ``set_state()`` method. ReadOnlyObjectError If the object is read-only. """ - if state is None and not kwargs: - raise TypeError( - "The `set_state()` method requires either 'state' or 'kwargs' arguments." - ) if self.get_attr(Attribute.IS_READ_ONLY.value): raise ReadOnlyObjectError(type(self).__name__) self.service.set_state( diff --git a/tests/test_meshing_workflow.py b/tests/test_meshing_workflow.py index 1b42442019b..be0e33e3ccf 100644 --- a/tests/test_meshing_workflow.py +++ b/tests/test_meshing_workflow.py @@ -576,18 +576,3 @@ def test_new_2d_meshing_workflow(new_mesh_session): # Switch to solution mode solver = meshing.switch_to_solver() assert solver - - -@pytest.mark.fluent_version(">=23.2") -def test_set_state_behavior(new_mesh_session): - meshing = new_mesh_session - assert not meshing.meshing.GlobalSettings.EnableOversetMeshing() - meshing.meshing.GlobalSettings.EnableOversetMeshing.set_state(True) - assert meshing.meshing.GlobalSettings.EnableOversetMeshing() - - meshing.meshing.GlobalSettings.set_state(EnableOversetMeshing=False) - assert not meshing.meshing.GlobalSettings.EnableOversetMeshing() - with pytest.raises(TypeError): - meshing.meshing.GlobalSettings.set_state() - with pytest.raises(TypeError): - meshing.meshing.GlobalSettings.EnableOversetMeshing.set_state()