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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: deflake file watcher function reload detection (#9345)
Akshay Agrawala7a2461269cc
diff --git a/tests/_runtime/reload/test_module_watcher.py b/tests/_runtime/reload/test_module_watcher.pyindex 263e1a8425..dbfbd980ad 100644--- a/tests/_runtime/reload/test_module_watcher.py+++ b/tests/_runtime/reload/test_module_watcher.py@@ -39,6 +39,7 @@ def _setup_test_sleep():# these tests use random filenames for modules because they share# the same sys.modules object, and each test needs fresh modules[email protected](reruns=3)async def test_reload_function(tmp_path: pathlib.Path,py_modname: str,@@ -77,7 +78,16 @@ async def test_reload_function()# wait for the watcher to pick up the change- await asyncio.sleep(INTERVAL * 3)+ retries = 0+ while retries < 10:+ await asyncio.sleep(INTERVAL)+ retries += 1+ if (+ k.graph.cells[er_1.cell_id].stale+ and k.graph.cells[er_2.cell_id].stale+ ):+ break+assert k.graph.cells[er_1.cell_id].staleassert k.graph.cells[er_2.cell_id].staleassert not k.graph.cells[er_3.cell_id].stale