@@ -96,8 +96,6 @@ class MyService:
96
96
log : nexusrpc .Operation [Input , Output ]
97
97
workflow_run_operation_happy_path : nexusrpc .Operation [Input , Output ]
98
98
sync_operation_with_non_async_def : nexusrpc .Operation [Input , Output ]
99
- # TODO(nexus-prerelease): fix tests of callable instances
100
- # sync_operation_with_non_async_callable_instance: nexusrpc.Operation[Input, Output]
101
99
operation_returning_unwrapped_result_at_runtime_error : nexusrpc .Operation [
102
100
Input , Output
103
101
]
@@ -238,29 +236,6 @@ async def sync_operation_with_non_async_def(
238
236
value = f"from start method on { self .__class__ .__name__ } : { input .value } "
239
237
)
240
238
241
- if False :
242
- # TODO(nexus-prerelease): fix tests of callable instances
243
- def sync_operation_with_non_async_callable_instance (
244
- self ,
245
- ) -> OperationHandler [Input , Output ]:
246
- class start :
247
- def __call__ (
248
- self ,
249
- ctx : StartOperationContext ,
250
- input : Input ,
251
- ) -> Output :
252
- return Output (
253
- value = f"from start method on { self .__class__ .__name__ } : { input .value } "
254
- )
255
-
256
- return sync_operation (start ())
257
-
258
- _sync_operation_with_non_async_callable_instance = operation_handler (
259
- name = "sync_operation_with_non_async_callable_instance" ,
260
- )(
261
- sync_operation_with_non_async_callable_instance ,
262
- )
263
-
264
239
@workflow_run_operation
265
240
async def workflow_run_op_link_test (
266
241
self , ctx : WorkflowRunOperationContext , input : Input
@@ -472,16 +447,6 @@ class SyncHandlerHappyPathNonAsyncDef(_TestCase):
472
447
)
473
448
474
449
475
- class SyncHandlerHappyPathWithNonAsyncCallableInstance (_TestCase ):
476
- operation = "sync_operation_with_non_async_callable_instance"
477
- input = Input ("hello" )
478
- expected = SuccessfulResponse (
479
- status_code = 200 ,
480
- body_json = {"value" : "from start method on MyServiceHandler: hello" },
481
- )
482
- skip = "TODO(nexus-prerelease): fix tests of callable instances"
483
-
484
-
485
450
class AsyncHandlerHappyPath (_TestCase ):
486
451
operation = "workflow_run_operation_happy_path"
487
452
input = Input ("hello" )
@@ -671,8 +636,6 @@ class NonSerializableOutputFailure(_FailureTestCase):
671
636
SyncHandlerHappyPath ,
672
637
SyncHandlerHappyPathRenamed ,
673
638
SyncHandlerHappyPathNonAsyncDef ,
674
- # TODO(nexus-prerelease): make callable instance work
675
- # SyncHandlerHappyPathWithNonAsyncCallableInstance,
676
639
AsyncHandlerHappyPath ,
677
640
WorkflowRunOpLinkTestHappyPath ,
678
641
],
0 commit comments