Skip to content

Commit 5df2903

Browse files
committed
Delete failing callable instance test
This is nexusrpc responsibility and it has a broken test like this
1 parent d69d22b commit 5df2903

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

tests/nexus/test_handler.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ class MyService:
9696
log: nexusrpc.Operation[Input, Output]
9797
workflow_run_operation_happy_path: nexusrpc.Operation[Input, Output]
9898
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]
10199
operation_returning_unwrapped_result_at_runtime_error: nexusrpc.Operation[
102100
Input, Output
103101
]
@@ -238,29 +236,6 @@ async def sync_operation_with_non_async_def(
238236
value=f"from start method on {self.__class__.__name__}: {input.value}"
239237
)
240238

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-
264239
@workflow_run_operation
265240
async def workflow_run_op_link_test(
266241
self, ctx: WorkflowRunOperationContext, input: Input
@@ -472,16 +447,6 @@ class SyncHandlerHappyPathNonAsyncDef(_TestCase):
472447
)
473448

474449

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-
485450
class AsyncHandlerHappyPath(_TestCase):
486451
operation = "workflow_run_operation_happy_path"
487452
input = Input("hello")
@@ -671,8 +636,6 @@ class NonSerializableOutputFailure(_FailureTestCase):
671636
SyncHandlerHappyPath,
672637
SyncHandlerHappyPathRenamed,
673638
SyncHandlerHappyPathNonAsyncDef,
674-
# TODO(nexus-prerelease): make callable instance work
675-
# SyncHandlerHappyPathWithNonAsyncCallableInstance,
676639
AsyncHandlerHappyPath,
677640
WorkflowRunOpLinkTestHappyPath,
678641
],

0 commit comments

Comments
 (0)