got Future <_GatheringFuture pending> attached to a different loop
when running pytest through PyCharm's debugger
#1244
Unanswered
golmschenk
asked this question in
Q&A
Replies: 1 comment
-
The repository is really helpful to reproduce the issue. I tried to reproduce it locally by checking out the linked repo and running I will have to retest with PyCharm to see if its debugger is the cause of the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm running into a issue where my test runs fine through a normal run of the tests, but when run with PyCharm's debugger, I encounter a
got Future <_GatheringFuture pending> attached to a different loop
error. This seems related to a common issue others encounter with pytest-asyncio. However, the fixes for this don't appear to be applicable in this case, I assume in some way due to how PyCharm initiates the tests. A minimal example I'm encountering the issue in is:I've also prepared a full repository with dependencies specified to reproduce the issue.
Notably, I'm not directly using
asyncio
anywhere within my own code. However, I presume the Xarray Zarr dependency is.I have attempted both setting
asyncio_default_fixture_loop_scope = "function"
and passing a fixture to the test that changes the event loop policy tofunction
. Neither seems to have an impact. Has anyone encountered this issue and had a fix for it? Using PyCharm's debugger during my tests is a fairly important part of my workflow, so any advice would be appreciated. I can open this discussion as an issue if it seems appropriate as well. Or, if thepytest-asyncio
community thinks this is a bug on the Xarray Zarr side of things, please let me know, and I'll direct this issue there. Thank you for your time!Beta Was this translation helpful? Give feedback.
All reactions