Skip to content

Commit 72ac6d9

Browse files
committed
Test more result types
1 parent 98f8e3b commit 72ac6d9

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

tests/unit_tests/worker/test_task_worker.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -895,15 +895,21 @@ def test_plan_module_with_composite_devices_can_be_loaded_before_device_module(
895895
assert params["composite"].second_fake_device == second_fake_device
896896

897897

898-
class NotSerializable:
899-
pass
900-
901-
902898
@pytest.mark.parametrize(
903899
"plan_result,task_result,type_name",
904900
(
905-
(NotSerializable(), None, "NotSerializable"),
906-
((NotSerializable(), NotSerializable()), None, "tuple"),
901+
(Unreturnable(foo=1, bar=[]), None, "Unreturnable"),
902+
((Unreturnable(foo=2, bar=[]), Unreturnable(foo=3, bar=[])), None, "tuple"),
903+
(
904+
ComplexReturn(foo=4, bar=["one"]),
905+
{"foo": 4, "bar": ["one"]},
906+
"ComplexReturn",
907+
),
908+
(
909+
ModelReturn(foo=5, bar=["two"]),
910+
{"foo": 5, "bar": ["two"]},
911+
"ModelReturn",
912+
),
907913
(42, 42, "int"),
908914
((1, 2), [1, 2], "tuple"),
909915
),

0 commit comments

Comments
 (0)