Fix formatting
This commit is contained in:
@@ -305,7 +305,7 @@ async def test_double_send():
|
||||
class PromiseJoinServer(capability.TestPipeline.Server):
|
||||
async def getCap(self, n, inCap, _context, **kwargs):
|
||||
res = await inCap.foo(i=n)
|
||||
response = await inCap.foo(i = int(res.x) + 1)
|
||||
response = await inCap.foo(i=int(res.x) + 1)
|
||||
_results = _context.results
|
||||
_results.s = response.x + "_bar"
|
||||
_results.outBox.cap = inCap
|
||||
|
||||
@@ -19,8 +19,8 @@ class Server(test_capability_capnp.TestInterface.Server):
|
||||
|
||||
async def test_simple_rpc_with_options():
|
||||
read, write = socket.socketpair()
|
||||
read = await capnp.AsyncIoStream.create_connection(sock = read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock = write)
|
||||
read = await capnp.AsyncIoStream.create_connection(sock=read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock=write)
|
||||
|
||||
_ = capnp.TwoPartyServer(write, bootstrap=Server())
|
||||
# This traversal limit is too low to receive the response in, so we expect
|
||||
@@ -36,8 +36,8 @@ async def test_simple_rpc_with_options():
|
||||
|
||||
async def test_simple_rpc_bootstrap():
|
||||
read, write = socket.socketpair()
|
||||
read = await capnp.AsyncIoStream.create_connection(sock = read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock = write)
|
||||
read = await capnp.AsyncIoStream.create_connection(sock=read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock=write)
|
||||
|
||||
_ = capnp.TwoPartyServer(write, bootstrap=Server(100))
|
||||
client = capnp.TwoPartyClient(read)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import gc
|
||||
import os
|
||||
import pytest
|
||||
import socket
|
||||
import sys # add examples dir to sys.path
|
||||
|
||||
@@ -15,8 +14,8 @@ import async_calculator_server # noqa: E402
|
||||
|
||||
async def test_calculator():
|
||||
read, write = socket.socketpair()
|
||||
read = await capnp.AsyncIoStream.create_connection(sock = read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock = write)
|
||||
read = await capnp.AsyncIoStream.create_connection(sock=read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock=write)
|
||||
|
||||
_ = capnp.TwoPartyServer(write, bootstrap=async_calculator_server.CalculatorImpl())
|
||||
await async_calculator_client.main(read)
|
||||
@@ -31,8 +30,8 @@ async def test_calculator_gc():
|
||||
return call
|
||||
|
||||
read, write = socket.socketpair()
|
||||
read = await capnp.AsyncIoStream.create_connection(sock = read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock = write)
|
||||
read = await capnp.AsyncIoStream.create_connection(sock=read)
|
||||
write = await capnp.AsyncIoStream.create_connection(sock=write)
|
||||
|
||||
# inject a gc.collect to the beginning of every evaluate_impl call
|
||||
evaluate_impl_orig = async_calculator_server.evaluate_impl
|
||||
|
||||
Reference in New Issue
Block a user