Repository navigation
fix(events): preserve pytest outcomes without closing the connection - #3366
microsoft-playwright-automation[bot] wants to merge 2 commits into
Conversation
| T = TypeVar("T") | ||
|
|
||
| # Python only: these stop execution, unlike user errors such as pytest.fail(). | ||
| CONTROL_FLOW_EXCEPTIONS = ( |
There was a problem hiding this comment.
Why are we allow-listing exceptions here? Can we instead only pass-through some exceptions that we want to support, like pytest ones? If we need some kind of internal API for that, let's make one.
There was a problem hiding this comment.
Replaced the exclusion list with a shared helper that selects only Exception and pytest's failure, skip, and xfail classes. Other BaseException subclasses are no longer caught; the extended regression checks this, and no registration API is needed for pytest's existing classes.
Revised on macOS by the Playwright bot - agent run
This comment has been minimized.
This comment has been minimized.
|
Hi, I'm the Playwright bot and I addressed the review. The listener-error path now catches only The regression passes on Chromium, Firefox, and WebKit. It fails without the fix; the added assertion for an unregistered Revised on macOS by the Playwright bot - agent run |
ed54919 to
3c82bc5
Compare
BaseException, so the event emitter and dispatch error boundary let them escape and stop the pipe reader. Handle these outcomes through the existing listener-error path without closing the connection.test_console_reprto check handled and unhandled pytest failures and a subsequent successful API call.Verified in Chromium, Firefox, and WebKit: the regression fails without the fix and passes with it; 119 sync and 80 async checks passed, with one existing skip per run.
mypy playwrightand full repository lint passed.Fixes #3360
Triaged on macOS by the Playwright bot - agent run