We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
loop fixture missing with aiomisc 17
loop
Tests should succeed.
caio> ==================================== ERRORS ==================================== caio> __ ERROR at setup of test_operations_cancel_cleanly[caio.python_aio_asyncio] ___ caio> file /build/source/tests/test_asyncio_adapter.py, line 65 caio> @aiomisc.timeout(3) caio> async def test_operations_cancel_cleanly( caio> tmp_path, async_context_maker, asyncio_exception_handler caio> ): caio> async with async_context_maker() as context: caio> with open(str(tmp_path / "temp.bin"), "wb+") as fp: caio> fd = fp.fileno() caio> caio> await context.write(b"\x00", fd, 1024**2 - 1) caio> assert os.stat(fd).st_size == 1024**2 caio> caio> for _ in range(50): caio> reads = [ caio> asyncio.create_task(context.read(2**16, fd, 2**16 * i)) caio> for i in range(16) caio> ] caio> _, pending = await asyncio.wait( caio> reads, return_when=asyncio.FIRST_COMPLETED caio> ) caio> for read in pending: caio> read.cancel() caio> if pending: caio> await asyncio.wait(pending) caio> asyncio_exception_handler.assert_not_called() caio> file /build/source/tests/test_asyncio_adapter.py, line 54 caio> @pytest.fixture caio> async def asyncio_exception_handler(loop): caio> handler = Mock( caio> side_effect=lambda _loop, ctx: _loop.default_exception_handler(ctx) caio> ) caio> current_handler = loop.get_exception_handler() caio> loop.set_exception_handler(handler=handler) caio> yield handler caio> loop.set_exception_handler(current_handler) caio> E fixture 'loop' not found caio> > available fixtures: async_context_maker, asyncio_exception_handler, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, context_maker, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory caio> > use 'pytest --fixtures [testpath]' for help on them. caio> caio> /build/source/tests/test_asyncio_adapter.py:54 caio> =============================== warnings summary =============================== caio> tests/test_asyncio_adapter.py::test_adapter[caio.python_aio_asyncio] caio> tests/test_asyncio_adapter.py::test_bad_file_descritor[caio.python_aio_asyncio] caio> /nix/store/ma77c9gm2zbikjjgf3i6hs3rp9i13f2r-python3.10-pytest-7.2.1/lib/python3.10/site-packages/_pytest/python.py:184: PytestUnhandledCoroutineWarning: async def functions are not natively supported and have been skipped. caio> You need to install a suitable plugin for your async framework, for example: caio> - anyio caio> - pytest-asyncio caio> - pytest-tornasync caio> - pytest-trio caio> - pytest-twisted caio> warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid))) caio> caio> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html caio> =========================== short test summary info ============================ caio> ERROR tests/test_asyncio_adapter.py::test_operations_cancel_cleanly[caio.python_aio_asyncio]
platform linux -- Python 3.10.10, pytest-7.2.1, pluggy-1.0.0
and aiomisc 17.0.6
The text was updated successfully, but these errors were encountered:
aiomisc-pytest is now a separate module
aiomisc-pytest
Sorry, something went wrong.
@mweinelt fixes in master
No branches or pull requests
Long story short
loop
fixture missing with aiomisc 17Expected behavior
Tests should succeed.
Actual behavior
Steps to reproduce
Environment info
and aiomisc 17.0.6
Additional info
The text was updated successfully, but these errors were encountered: