|
34 | 34 | from autobahn.asyncio.component import Component
|
35 | 35 |
|
36 | 36 | @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+")
|
37 |
| - @pytest.mark.asyncio(forbid_global_loop=True) |
38 |
| - async def test_asyncio_component(event_loop): |
| 37 | + def test_asyncio_component(event_loop): |
39 | 38 | orig_loop = txaio.config.loop
|
40 | 39 | txaio.config.loop = event_loop
|
41 | 40 |
|
@@ -72,11 +71,11 @@ def done(f):
|
72 | 71 | txaio.config.loop = orig_loop
|
73 | 72 | assert comp._done_f is None
|
74 | 73 | f.add_done_callback(done)
|
75 |
| - await finished |
| 74 | + |
| 75 | + event_loop.run_until_complete(finished) |
76 | 76 |
|
77 | 77 | @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+")
|
78 |
| - @pytest.mark.asyncio(forbid_global_loop=True) |
79 |
| - async def test_asyncio_component_404(event_loop): |
| 78 | + def test_asyncio_component_404(event_loop): |
80 | 79 | """
|
81 | 80 | If something connects but then gets aborted, it should still try
|
82 | 81 | to re-connect (in real cases this could be e.g. wrong path,
|
@@ -151,4 +150,5 @@ def done(f):
|
151 | 150 | finished.set_result(None)
|
152 | 151 | txaio.config.loop = orig_loop
|
153 | 152 | f.add_done_callback(done)
|
154 |
| - await finished |
| 153 | + |
| 154 | + event_loop.run_until_complete(finished) |
0 commit comments