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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Use anyio
, so that ASGI support works for both asyncio and Trio
#1872
Labels
Core: Transport
Sending data to the tested app
Type: Compatibility
Compatibility with other tools
Type: Feature
New functionalities or enhancements
Comments
Zac-HD
added
Status: Needs Triage
Requires initial assessment to categorize and prioritize
Type: Feature
New functionalities or enhancements
labels
Nov 2, 2023
Stranger6667
added
Type: Compatibility
Compatibility with other tools
Core: Transport
Sending data to the tested app
and removed
Status: Needs Triage
Requires initial assessment to categorize and prioritize
labels
Nov 6, 2023
The current blocker is that |
IIRC aiohttp is asyncio-specific, so you might need to switch that out for httpx. pytest-anyio may also be helpful? |
Stranger6667
added a commit
that referenced
this issue
Feb 11, 2024
Ref: #1872 Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Merged
Stranger6667
added a commit
that referenced
this issue
Feb 11, 2024
Ref: #1872 Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667
added a commit
that referenced
this issue
Feb 11, 2024
Ref: #1872 Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667
added a commit
that referenced
this issue
Feb 11, 2024
Ref: #1872 Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667
added a commit
that referenced
this issue
Feb 12, 2024
Ref: #1872 Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
In the next release, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Core: Transport
Sending data to the tested app
Type: Compatibility
Compatibility with other tools
Type: Feature
New functionalities or enhancements
The support for directly testing ASGI apps is really nice, but at the moment it doesn't support Trio - so I can't use it 馃槩
Fortunately this is pretty easy to fix by using
anyio
, a compatibility layer which can be run against either asyncio or Trio backends; it's already widely used by e.g. httpx and starlette/fastapi. What that would look like:schemathesis/src/schemathesis/_hypothesis.py
Lines 99 to 106 in 8c4fe09
I think the main effort here would actually be to test something on trio as well as asyncio, which shouldn't be too hard to parametrize.
The text was updated successfully, but these errors were encountered: