Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/test_aio_low_level.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from dbus_next.aio import MessageBus
from dbus_next import Message, MessageType, MessageFlag

import asyncio
import pytest


Expand Down Expand Up @@ -101,7 +102,8 @@ def message_handler_error(sent):


@pytest.mark.asyncio
async def test_sending_signals_between_buses(event_loop):
async def test_sending_signals_between_buses():
event_loop = asyncio.get_running_loop()
bus1 = await MessageBus().connect()
bus2 = await MessageBus().connect()

Expand Down
7 changes: 5 additions & 2 deletions test/test_disconnect.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from dbus_next.aio import MessageBus
from dbus_next import Message

import asyncio
import os
import pytest
import functools


@pytest.mark.asyncio
async def test_bus_disconnect_before_reply(event_loop):
async def test_bus_disconnect_before_reply():
'''In this test, the bus disconnects before the reply comes in. Make sure
the caller receives a reply with the error instead of hanging.'''
event_loop = asyncio.get_running_loop()
bus = MessageBus()
assert not bus.connected
await bus.connect()
Expand All @@ -32,7 +34,8 @@ async def test_bus_disconnect_before_reply(event_loop):


@pytest.mark.asyncio
async def test_unexpected_disconnect(event_loop):
async def test_unexpected_disconnect():
event_loop = asyncio.get_running_loop()
bus = MessageBus()
assert not bus.connected
await bus.connect()
Expand Down
7 changes: 5 additions & 2 deletions test/test_fd_passing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from dbus_next import Message, MessageType
import os

import asyncio
import pytest


Expand Down Expand Up @@ -112,7 +113,8 @@ def message_handler(sent):


@pytest.mark.asyncio
async def test_high_level_service_fd_passing(event_loop):
async def test_high_level_service_fd_passing():
event_loop = asyncio.get_running_loop()
bus1 = await MessageBus(negotiate_unix_fd=True).connect()
bus2 = await MessageBus(negotiate_unix_fd=True).connect()

Expand Down Expand Up @@ -212,7 +214,8 @@ def fd_listener(msg):


@pytest.mark.asyncio
async def test_sending_file_descriptor_with_proxy(event_loop):
async def test_sending_file_descriptor_with_proxy():
event_loop = asyncio.get_running_loop()
name = 'dbus.next.test.service'
path = '/test/path'
interface_name = 'test.interface'
Expand Down
3 changes: 2 additions & 1 deletion test/test_tcp_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@


@pytest.mark.asyncio
async def test_tcp_connection_with_forwarding(event_loop):
async def test_tcp_connection_with_forwarding():
event_loop = asyncio.get_running_loop()
closables = []
host = '127.0.0.1'
port = '55556'
Expand Down