diff --git a/setup.cfg b/setup.cfg index 97c23ab..cc101f5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -101,6 +101,8 @@ log_file_level = DEBUG # Unraisable exceptions are filtered because PyTest yields false-positives coming from PyCyphal. addopts = --doctest-modules -v -p no:unraisableexception asyncio_mode = auto +filterwarnings = + ignore:.*SDL2.*:UserWarning # ---------------------------------------- MYPY ---------------------------------------- [mypy] diff --git a/tests/cmd/monitor.py b/tests/cmd/monitor.py index 722f9dc..fa423f0 100755 --- a/tests/cmd/monitor.py +++ b/tests/cmd/monitor.py @@ -290,10 +290,13 @@ async def _run_zombie() -> None: pres = pycyphal.presentation.Presentation(tr) try: pub = pres.make_publisher(Empty_1, 99) + pub.send_timeout = 5.0 + sub = pres.make_subscriber(Empty_1, 99) # Ensure there's an RX socket on Windows. while True: - await pub.publish(Empty_1()) + assert await pub.publish(Empty_1()) await asyncio.sleep(0.5) - except (asyncio.TimeoutError, asyncio.CancelledError): # pragma: no cover + _ = await sub.receive_for(0.0) # Avoid queue overrun. + except (asyncio.TimeoutError, asyncio.CancelledError, GeneratorExit): # pragma: no cover pass finally: pres.close() diff --git a/yakut/__main__.py b/yakut/__main__.py index 8edf42f..51904a1 100644 --- a/yakut/__main__.py +++ b/yakut/__main__.py @@ -3,6 +3,10 @@ # Author: Pavel Kirienko if __name__ == "__main__": + from warnings import filterwarnings + + filterwarnings("ignore") # Warnings are meant for developers and should not be shown to users. + from yakut import main main() # pylint: disable=no-value-for-parameter