-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I have a project using pytest-twisted, and I'd like to write some tests using hypothesis' stateful testing. Since the control-flow of stateful testing is handled by hypothesis, I use pytest_twisted.blockon in the tests to interact with twisted.
However, this doesn't work by default, as pytest-twisted forces every test function to run in the reactor greenlet. There is a comment in the pytest_pyfunc_call hook suggesting this change:
pytest-twisted/pytest_twisted.py
Lines 357 to 363 in cc03b11
| def pytest_pyfunc_call(pyfuncitem): | |
| """Interface to async test call handler.""" | |
| # TODO: only handle 'our' tests? what is the point of handling others? | |
| # well, because our interface allowed people to return deferreds | |
| # from arbitrary tests so we kinda have to keep this up for now | |
| _run_inline_callbacks(_async_pytest_pyfunc_call, pyfuncitem) | |
| return not None |
This is perhaps a duplicate of #64.
Metadata
Metadata
Assignees
Labels
No labels