From 0386dc232274c6de0717e9a3f280d98379acbf45 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 7 Sep 2023 09:54:18 -0500 Subject: [PATCH] chore: add test coverage for issue 239 (#240) --- tests/test_aio_multi_flags.py | 25 +++++++++++++++++++++++++ tests/test_glib_low_level.py | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/test_aio_multi_flags.py diff --git a/tests/test_aio_multi_flags.py b/tests/test_aio_multi_flags.py new file mode 100644 index 0000000..ddc3f2f --- /dev/null +++ b/tests/test_aio_multi_flags.py @@ -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() diff --git a/tests/test_glib_low_level.py b/tests/test_glib_low_level.py index 2aa41e6..7b65745 100644 --- a/tests/test_glib_low_level.py +++ b/tests/test_glib_low_level.py @@ -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(