aioprocessing
aioprocessing copied to clipboard
Test Deprecation Warnings and intermittent failure
Pytests have picked up a number of deprecation warnings (one involving the elimination of get_event_loop()). Also, CI tests fail intermittently with "Exception ignored".
$ python3 -m pytest -W=all
============================================================================================================================== test session starts ==============================================================================================================================
platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /home/daves/github/aioprocessing, configfile: pytest.ini
plugins: asyncio-0.18.2
asyncio: mode=strict
collected 23 items
tests/pickle_test.py . [ 4%]
tests/pool_test.py ....... [ 34%]
tests/process_test.py ... [ 47%]
tests/queue_test.py ............ [100%]
=============================================================================================================================== warnings summary ================================================================================================================================
tests/pool_test.py: 7 warnings
tests/process_test.py: 1 warning
tests/queue_test.py: 12 warnings
/home/daves/github/aioprocessing/tests/_base_test.py:9: DeprecationWarning: There is no current event loop
self.loop = asyncio.get_event_loop()
tests/pool_test.py::GenAioPoolTest::test_ctx
tests/pool_test.py::GenAioPoolTest::test_loop
tests/pool_test.py::GenAioPoolTest::test_loop
/usr/lib/python3.10/multiprocessing/pool.py:265: ResourceWarning: unclosed running multiprocessing pool <multiprocessing.pool.Pool state=RUN pool_size=1>
_warn(f"unclosed running multiprocessing pool {self!r}",
tests/pool_test.py::GenAioPoolTest::test_loop
/home/daves/github/aioprocessing/aioprocessing/pool.py:23: DeprecationWarning: There is no current event loop
fut = Future()
tests/pool_test.py::PoolTest::test_coro_apply
tests/queue_test.py::GenAioJoinableQueueTest::test_loop
tests/queue_test.py::GenAioJoinableQueueTest::test_loop
tests/queue_test.py::GenAioJoinableQueueTest::test_loop
/usr/lib/python3.10/asyncio/base_events.py:685: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
_warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================================================================================================================== 23 passed, 28 warnings in 0.39s ========================================================================================================================
daves@debian:~/github/aioprocessing$