Skip to content
File

Blob: src/workerd/server/tests/python/python-abort-isolate-on-fatal/worker.py

python13 lines
1# Copyright (c) 2026 Cloudflare, Inc.
2# Licensed under the Apache 2.0 license found in the LICENSE file or at:
3# https://opensource.org/licenses/Apache-2.0
4 
5 
6async def test(ctrl, env, ctx):
7 # _pyodide_core.trigger_fatal_error() invokes Pyodide's on_fatal handler. With the
8 # python-abort-isolate-on-fatal-error autogate enabled, the on_fatal handler calls
9 # abortIsolate() which terminates the workerd process.
10 from _pyodide_core import trigger_fatal_error
11 
12 trigger_fatal_error()