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.

test: xfail a flaky `app` test in CI (#9361)

Akshay Agrawal76cc73b0638f
diff --git a/tests/_ast/test_app.py b/tests/_ast/test_app.py
index a03cae7983..0fbe07a65d 100644
--- a/tests/_ast/test_app.py
+++ b/tests/_ast/test_app.py
@@ -1117,6 +1117,12 @@ def test_cli_args(tmp_path: pathlib.Path) -> None:
assert "value2" in output
+# TODO(akshayka): Many of the app composition and embedding tests are flaky in
+# CI. This suggests either cross-test state pollution or a bug in the
+# underlying implementation. These bugs are not high priority to fix, so
+# the flaky tests have been marked as xfail. If this ever does become
+# a priority (in particular, if we see GitHub issues about these methods
+# failing in real usage), these failing tests may provide a clue.
class TestAppComposition:
async def test_app_embed(self) -> None:
app = App()
@@ -1784,6 +1790,10 @@ class TestInternalAppOverrides:
assert not k.errors
assert k.globals["overrides"] == {"x": 100}
+
+ @pytest.mark.xfail(
+ True, reason="Flaky in CI, can't repro locally", strict=False
+ )
async def test_overrides_returns_multiple_defs(
self, k: Kernel, exec_req: ExecReqProvider
) -> None:
@@ -1827,8 +1837,6 @@ class TestInternalAppOverrides:
assert k.globals["overrides"] == {"a": 10, "b": 20}
-
-
class TestAppKernelRunnerRegistry:
def test_get_runner(self, k: Kernel) -> None:
# `k` fixture installs a context, needed for AppKernelRunner