chore: add test coverage for issue 239 (#240)
This commit is contained in:
parent
91ad820069
commit
0386dc2322
25
tests/test_aio_multi_flags.py
Normal file
25
tests/test_aio_multi_flags.py
Normal file
@ -0,0 +1,25 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageFlag, MessageType
|
||||
from dbus_fast.aio import MessageBus
|
||||
from dbus_fast.service import ServiceInterface, method
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.asyncio
|
||||
async def test_multiple_flags_in_message():
|
||||
class ExampleInterface(ServiceInterface):
|
||||
def __init__(self, name):
|
||||
super().__init__(name)
|
||||
|
||||
@method()
|
||||
def Echo(self, what: "s") -> "s": # noqa: F821
|
||||
return what
|
||||
|
||||
bus = await MessageBus().connect()
|
||||
interface = ExampleInterface("test.interface")
|
||||
bus.export("/test/path", interface)
|
||||
await bus.request_name("test.name")
|
||||
await bus.wait_for_disconnect()
|
||||
@ -13,7 +13,9 @@ if has_gi:
|
||||
|
||||
|
||||
@pytest.mark.skipif(not has_gi, reason=skip_reason_no_gi)
|
||||
@pytest.mark.skipif(sys.version_info[:3][1] in (11,), reason="segfaults on py3.11")
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info[:3][1] in (10, 11, 12), reason="segfaults on py3.10,py3.11,py3.12"
|
||||
)
|
||||
def test_standard_interfaces():
|
||||
bus = MessageBus().connect_sync()
|
||||
msg = Message(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user