Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with pytest 8 #25

Open
hrnciar opened this issue May 22, 2024 · 0 comments
Open

Compatibility with pytest 8 #25

hrnciar opened this issue May 22, 2024 · 0 comments

Comments

@hrnciar
Copy link

hrnciar commented May 22, 2024

I am getting a test failure when built with pytest 8.2.1.

=================================== FAILURES ===================================
_______________ TestAsyncCaseWithCustomLoop.test_await_async_add _______________
../../BUILDROOT/python-aiounittest-1.3.1-16.fc41.x86_64/usr/lib/python3.12/site-packages/aiounittest/helpers.py:137: in wrapper
    future = asyncio.ensure_future(ret, loop=loop)
/usr/lib64/python3.12/asyncio/tasks.py:695: in ensure_future
    return loop.create_task(coro_or_future)
/usr/lib64/python3.12/asyncio/base_events.py:456: in create_task
    self._check_closed()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_UnixSelectorEventLoop running=False closed=True debug=False>

    def _check_closed(self):
        if self._closed:
>           raise RuntimeError('Event loop is closed')
E           RuntimeError: Event loop is closed

/usr/lib64/python3.12/asyncio/base_events.py:541: RuntimeError
=============================== warnings summary ===============================
tests/test_asynctestcase_get_event_loop.py:30
  /builddir/build/BUILD/aiounittest-1.3.1/tests/test_asynctestcase_get_event_loop.py:30: DeprecationWarning: There is no current event loop
    self.my_loop = asyncio.get_event_loop()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_asynctestcase_get_event_loop.py::TestAsyncCaseWithCustomLoop::test_await_async_add
============== 1 failed, 8 passed, 2 xfailed, 1 warning in 0.89s ===============
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant