Fix formatting

This commit is contained in:
Lasse Blaauwbroek
2023-06-08 08:18:50 +02:00
parent bc01774ede
commit 84d0f365ad
6 changed files with 137 additions and 52 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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