From c01004d71f88d74a770a140386f3f187d917bd7f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 22 May 2017 13:57:57 +0300 Subject: [PATCH] uasyncio.core: Add test for callback args to call_soon(). --- uasyncio.core/test_cb_args.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 uasyncio.core/test_cb_args.py diff --git a/uasyncio.core/test_cb_args.py b/uasyncio.core/test_cb_args.py new file mode 100644 index 00000000..8bf80a6b --- /dev/null +++ b/uasyncio.core/test_cb_args.py @@ -0,0 +1,16 @@ +try: + import uasyncio.core as asyncio +except: + import asyncio + + +def cb(a, b): + assert a == "test" + assert b == "test2" + loop.stop() + + +loop = asyncio.get_event_loop() +loop.call_soon(cb, "test", "test2") +loop.run_forever() +print("OK")