Skip to content

Commit

Permalink
test: use datamodelgen
Browse files Browse the repository at this point in the history
  • Loading branch information
mkundu1 committed Dec 12, 2024
1 parent 4aba979 commit 2964a98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_datamodel_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_add_on_deleted(new_meshing_session):
meshing.workflow.InitializeWorkflow(WorkflowType="Watertight Geometry")
data = []
_ = meshing.workflow.TaskObject["Import Geometry"].add_on_deleted(
lambda obj: data.append(convert_path_to_se_path(obj.path))
lambda: data.append(True)
)
assert data == []
meshing.workflow.InitializeWorkflow(WorkflowType="Fault-tolerant Meshing")
Expand Down Expand Up @@ -568,8 +568,8 @@ def test_on_deleted_lifetime(new_solver_session):
root = create_root_using_datamodelgen(solver._se_service, app_name)
root.A["A1"] = {}
data = []
_ = root.A["A1"].add_on_deleted(lambda _: data.append(1))
root.A["A1"].add_on_deleted(lambda _: data.append(2))
_ = root.A["A1"].add_on_deleted(lambda: data.append(1))
root.A["A1"].add_on_deleted(lambda: data.append(2))
gc.collect()
assert "/test/deleted/A:A1" in solver._se_service.subscriptions
assert "/test/deleted/A:A1-1" in solver._se_service.subscriptions
Expand Down

0 comments on commit 2964a98

Please sign in to comment.