Skip to content

Commit ea97e82

Browse files
fix mwf tests (#818)
1 parent 1b3bac2 commit ea97e82

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/ansys/fluent/core/meshing/workflow.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@ def __dir__(self):
3838

3939
class Task(PyCallableStateObject):
4040
def __init__(self, meshing, name):
41-
self._workflow = meshing._workflow
42-
self._meshing = meshing._meshing
43-
self._task = self._workflow.TaskObject[name]
44-
self._cmd = None
41+
self.__dict__.update(
42+
dict(
43+
_workflow=meshing._workflow,
44+
_meshing=meshing._meshing,
45+
_task=meshing._workflow.TaskObject[name],
46+
_cmd=None,
47+
)
48+
)
4549

4650
@property
4751
def CommandArguments(self):
@@ -62,6 +66,12 @@ def _command(self):
6266
def __getattr__(self, attr):
6367
return getattr(self._task, attr)
6468

69+
def __setattr__(self, attr, value):
70+
if attr in self.__dict__:
71+
self.__dict__[attr] = value
72+
else:
73+
setattr(self._task, attr, value)
74+
6575
def __dir__(self):
6676
return sorted(
6777
set(list(self.__dict__.keys()) + dir(type(self)) + dir(self._task))

tests/util/meshing_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def assign_task_arguments(
1111
task.Arguments = kwargs
1212
if check_state:
1313
# the state that we have set must be a subset of the total state
14-
assert kwargs.items() <= task.Arguments.items()
14+
assert kwargs.items() <= task.Arguments().items()
1515

1616

1717
def check_task_execute_preconditions(task) -> None:

0 commit comments

Comments
 (0)