diff options
| author | Michał Górny <mgorny@gentoo.org> | 2024-04-18 15:46:55 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2024-04-18 17:45:39 +0200 |
| commit | ba72d2be45a4f4203695aec1fb23b35c46fe2339 (patch) | |
| tree | 45c0d290b347a6b1b5401f415d45093eeb07d585 /dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch | |
| parent | b7bcb34f8bebe157a99316b72472f7c172d45d04 (diff) | |
| download | gentoo-ba72d2be45a4f4203695aec1fb23b35c46fe2339.tar.gz gentoo-ba72d2be45a4f4203695aec1fb23b35c46fe2339.tar.bz2 gentoo-ba72d2be45a4f4203695aec1fb23b35c46fe2339.zip | |
dev-python/autobahn: Fix asyncio testing
Closes: https://bugs.gentoo.org/930184
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch')
| -rw-r--r-- | dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch b/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch new file mode 100644 index 000000000000..2cdbd863231b --- /dev/null +++ b/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch @@ -0,0 +1,42 @@ +From 5ab94618723c488df640ae0777ac5a16ee1ab369 Mon Sep 17 00:00:00 2001 +From: David Hotham <david.hotham@microsoft.com> +Date: Sat, 13 Apr 2024 05:27:01 +0100 +Subject: [PATCH] unit test fixes (#1634) + +--- + autobahn/wamp/test/test_wamp_component_aio.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/autobahn/wamp/test/test_wamp_component_aio.py b/autobahn/wamp/test/test_wamp_component_aio.py +index 168933ea5..2de9bf358 100644 +--- a/autobahn/wamp/test/test_wamp_component_aio.py ++++ b/autobahn/wamp/test/test_wamp_component_aio.py +@@ -35,7 +35,7 @@ + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component(event_loop): ++ async def test_asyncio_component(event_loop): + orig_loop = txaio.config.loop + txaio.config.loop = event_loop + +@@ -72,11 +72,11 @@ def done(f): + txaio.config.loop = orig_loop + assert comp._done_f is None + f.add_done_callback(done) +- return finished ++ await finished + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component_404(event_loop): ++ async def test_asyncio_component_404(event_loop): + """ + If something connects but then gets aborted, it should still try + to re-connect (in real cases this could be e.g. wrong path, +@@ -151,4 +151,4 @@ def done(f): + finished.set_result(None) + txaio.config.loop = orig_loop + f.add_done_callback(done) +- return finished ++ await finished |
