Skip to content

Commit

Permalink
adjust tests for async
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneSlattery committed Jun 19, 2023
1 parent a5c29a7 commit f59b3fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_bundled_import_hook():
import stream_capnp # noqa: F401


def test_load_capnp(foo):
async def test_load_capnp(foo):
# test dynamically loading
loader = capnp.SchemaLoader()
loader.load(foo.Baz.schema.get_proto())
Expand All @@ -133,7 +133,7 @@ def test_load_capnp(foo):
assert schema.fields["qux"].proto.slot.type.which == "struct"

class Wrapper(foo.Wrapper.Server):
def wrapped(self, object, **kwargs):
async def wrapped(self, object, **kwargs):
assert isinstance(object, capnp.lib.capnp._DynamicObjectReader)
baz_ = object.as_struct(schema)
assert baz_.text == "test"
Expand All @@ -145,4 +145,5 @@ def wrapped(self, object, **kwargs):
baz_.qux.id = 2

wrapper = foo.Wrapper._new_client(Wrapper())
wrapper.wrapped(baz_).wait()
remote = wrapper.wrapped(baz_)
await remote

0 comments on commit f59b3fd

Please sign in to comment.