From 05d5d045ea3460a02979a7410dbddb069e54cb9f Mon Sep 17 00:00:00 2001 From: mhchia Date: Sun, 2 Feb 2020 18:17:22 +0800 Subject: [PATCH] Fix pubsub interop: missing unsubscribe_fn --- tests_interop/test_pubsub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_interop/test_pubsub.py b/tests_interop/test_pubsub.py index f15d89e3..793f2446 100644 --- a/tests_interop/test_pubsub.py +++ b/tests_interop/test_pubsub.py @@ -21,7 +21,7 @@ async def p2pd_subscribe(p2pd, topic, nursery): stream = TrioTCPStream(await p2pd.control.pubsub_subscribe(topic)) send_channel, receive_channel = trio.open_memory_channel(math.inf) - sub = TrioSubscriptionAPI(receive_channel) + sub = TrioSubscriptionAPI(receive_channel, unsubscribe_fn=stream.close) async def _read_pubsub_msg() -> None: while True: