File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11from dbus_next .aio import MessageBus
22from dbus_next import Message , MessageType , MessageFlag
33
4+ import asyncio
45import pytest
56
67
@@ -101,7 +102,8 @@ def message_handler_error(sent):
101102
102103
103104@pytest .mark .asyncio
104- async def test_sending_signals_between_buses (event_loop ):
105+ async def test_sending_signals_between_buses ():
106+ event_loop = asyncio .get_running_loop ()
105107 bus1 = await MessageBus ().connect ()
106108 bus2 = await MessageBus ().connect ()
107109
Original file line number Diff line number Diff line change 11from dbus_next .aio import MessageBus
22from dbus_next import Message
33
4+ import asyncio
45import os
56import pytest
67import functools
78
89
910@pytest .mark .asyncio
10- async def test_bus_disconnect_before_reply (event_loop ):
11+ async def test_bus_disconnect_before_reply ():
1112 '''In this test, the bus disconnects before the reply comes in. Make sure
1213 the caller receives a reply with the error instead of hanging.'''
14+ event_loop = asyncio .get_running_loop ()
1315 bus = MessageBus ()
1416 assert not bus .connected
1517 await bus .connect ()
@@ -32,7 +34,8 @@ async def test_bus_disconnect_before_reply(event_loop):
3234
3335
3436@pytest .mark .asyncio
35- async def test_unexpected_disconnect (event_loop ):
37+ async def test_unexpected_disconnect ():
38+ event_loop = asyncio .get_running_loop ()
3639 bus = MessageBus ()
3740 assert not bus .connected
3841 await bus .connect ()
Original file line number Diff line number Diff line change 55from dbus_next import Message , MessageType
66import os
77
8+ import asyncio
89import pytest
910
1011
@@ -112,7 +113,8 @@ def message_handler(sent):
112113
113114
114115@pytest .mark .asyncio
115- async def test_high_level_service_fd_passing (event_loop ):
116+ async def test_high_level_service_fd_passing ():
117+ event_loop = asyncio .get_running_loop ()
116118 bus1 = await MessageBus (negotiate_unix_fd = True ).connect ()
117119 bus2 = await MessageBus (negotiate_unix_fd = True ).connect ()
118120
@@ -212,7 +214,8 @@ def fd_listener(msg):
212214
213215
214216@pytest .mark .asyncio
215- async def test_sending_file_descriptor_with_proxy (event_loop ):
217+ async def test_sending_file_descriptor_with_proxy ():
218+ event_loop = asyncio .get_running_loop ()
216219 name = 'dbus.next.test.service'
217220 path = '/test/path'
218221 interface_name = 'test.interface'
Original file line number Diff line number Diff line change 88
99
1010@pytest .mark .asyncio
11- async def test_tcp_connection_with_forwarding (event_loop ):
11+ async def test_tcp_connection_with_forwarding ():
12+ event_loop = asyncio .get_running_loop ()
1213 closables = []
1314 host = '127.0.0.1'
1415 port = '55556'
You can’t perform that action at this time.
0 commit comments