pytest-trio icon indicating copy to clipboard operation
pytest-trio copied to clipboard

Pytest plugin for trio

Results 35 pytest-trio issues
Sort by recently updated
recently updated
newest added

I use pdbpp, which understands `__tracebackhide__` like pytest does. Today, `pytest --pdb` on a simultaneous fixture+test crash dumped me at ``` [10] > [...]/lib/python3.8/site-packages/_pytest/python.py(166)pytest_pyfunc_call() -> result = testfunction(**testargs) 9 frames...

1. the following https://pytest-trio.readthedocs.io/en/latest/quickstart.html 2. test code for `echo_server_handler` ``` import trio import pytest from functools import partial from trio.testing import open_stream_to_socket_listener # The code being tested: async def echo_server_handler(stream):...

In #50, we started using a [gross hack](https://github.com/python-trio/pytest-trio/blob/dd27d702d7b95e7dc15874a318500aa0c3c5d65d/pytest_trio/plugin.py#L189-L198) to make it so within each test invocation, all fixtures + the test itself all shared a single `contextvars.Context`. This simulates them...

In chat today, @catern was talking about how they got burned badly by forgetting an `await`, and was planning to make their test suite capture these warnings and fail any...

This will need some help from Trio – see https://github.com/python-trio/trio/issues/168

I hoped to be able to do the following for my test cases requiring `trio-asyncio`: @pytest_trio.trio_fixture async def trio_aio_loop(): async with trio_asyncio.open_loop() as loop: yield loop @pytest.mark.trio async def test_aio_funcs(trio_aio_loop,...

See here: https://travis-ci.org/python-trio/pytest-trio/jobs/406738301 I don't understand this at all: the test opens a `SocketListener`, then uses `open_stream_to_socket_listener` to connect to it. Somehow the connection attempt times out (at the OS...

Trio's requirements.in/requirements.txt + dependabot configuration has been working well. We should set it up here too. See #68 for an example of a problem that this would have caught.

Yes, asyncio's CoroWrapper is loud and annoying. However … ```python-traceback tests/python/test_events.py::TrioEventLoopTests::test_create_unix_server_ssl_verify_failed ERROR:asyncio: was never yielded from Coroutine object created at (most recent call last, truncated to 10 last lines): File...

As noted here: https://github.com/python-trio/pytest-trio/pull/50#issuecomment-413817328 > In the course of this (and also while thinking about python-trio/trio#607), I have started to think that maybe the details of our new cancellation rules...