Replies: 1 comment 1 reply
-
In case someone hits this: apparently it's when the task is cancelled too soon for sniffio to make the detection, I should've known that surely it's not this library fault! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I wrote some code that calls:
my code ->
httpx
->httpcore
->anyio
->sniffio
When I run it "in production", using
asyncio.run(start())
it's all fine.But then I try to start it in testing, using:
sniffio bails with
unknown async library, or not in async context
I'm not quite sure how to debug this... is there something special about the testing event loop?
Beta Was this translation helpful? Give feedback.
All reactions