Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: don't enable reactive tests in run mode (#8252)

Myles Scolnick0411ccf00ae3
diff --git a/marimo/_pyodide/pyodide_session.py b/marimo/_pyodide/pyodide_session.py
index b85971dcf3..cd12c46ce8 100644
--- a/marimo/_pyodide/pyodide_session.py
+++ b/marimo/_pyodide/pyodide_session.py
@@ -458,7 +458,7 @@ def _launch_pyodide_kernel(
)
hooks = create_default_hooks()
- if user_config["runtime"].get("reactive_tests", False):
+ if is_edit_mode and user_config["runtime"].get("reactive_tests", False):
hooks.add_post_execution(attempt_pytest, Priority.LATE)
if is_edit_mode:
hooks.add_post_execution(render_toplevel_defs, Priority.LATE)
diff --git a/marimo/_runtime/runtime.py b/marimo/_runtime/runtime.py
index ffae2b047b..19d0eda9f1 100644
--- a/marimo/_runtime/runtime.py
+++ b/marimo/_runtime/runtime.py
@@ -3210,7 +3210,7 @@ def launch_kernel(
)
hooks = create_default_hooks()
- if user_config["runtime"].get("reactive_tests", False):
+ if is_edit_mode and user_config["runtime"].get("reactive_tests", False):
hooks.add_post_execution(attempt_pytest, Priority.LATE)
if is_edit_mode:
hooks.add_post_execution(render_toplevel_defs, Priority.LATE)