Skip to content

Commit 371f655

Browse files
authored
[test] Use single element tuples (#81)
1 parent e50558e commit 371f655

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test-services/services/virtual_object_command_interpreter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def to_durable_future(ctx: ObjectContext, cmd: AwaitableCommand) -> RestateDurab
118118
elif cmd['type'] == "runThrowTerminalException":
119119
def side_effect(reason):
120120
raise TerminalError(message=reason)
121-
return ctx.run("run should fail command", side_effect, args=(cmd['reason']))
121+
return ctx.run("run should fail command", side_effect, args=(cmd['reason'],))
122122

123123
@virtual_object_command_interpreter.handler(name="interpretCommands")
124124
async def interpret_commands(ctx: ObjectContext, req: InterpretRequest):
@@ -140,7 +140,8 @@ async def interpret_commands(ctx: ObjectContext, req: InterpretRequest):
140140
reject_awakeable(ctx, cmd)
141141
result = ""
142142
elif cmd['type'] == "getEnvVariable":
143-
result = await ctx.run("get_env", lambda: os.environ.get(cmd['envName'], default=""))
143+
env_name = cmd['envName']
144+
result = await ctx.run("get_env", lambda e=env_name: os.environ.get(e, ""))
144145
elif cmd['type'] == "awaitOne":
145146
awaitable = to_durable_future(ctx, cmd['command'])
146147
# We need this dance because the Python SDK doesn't support .map on futures

0 commit comments

Comments
 (0)