You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wdspec: bidi_session fixture swallows setup failures, reporting them as bare StopAsyncIteration #62500
I'm currently trying to get Project Foxhound to work well with WPT and found some WPT upstream bugs, I believe.
Issue
The first is that when session setup fails during setup in BiDi, the actual error is discarded, and pytest only reports StopAsyncIteration, i.e., dropping both the traceback and the actual cause.
Cause
From what I can see, the issue is in the following difference:
For Classic, if the creation fails the session function raises the caught exception again. For BiDi, no exception is raised in the handler.
Now, if something before the yield, e.g., bidi_session.start throws, the generator quits without ever yielding, with an empty return.
Calling the asynchronous iterator's aiterator.__anext__ <object.__anext__> method
will return an awaitable which when awaited
will execute until it provides a value using the yield
expression. When the function executes an empty return
statement or falls off the end, a StopAsyncIteration exception
is raised and the asynchronous iterator will have reached the end of
the set of values to be yielded.
Activity