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.

Update snapshot + add edgecase (#1472)

Dylan Madisetti9849e12e62a9
diff --git a/tests/_cli/snapshots/unsafe-doc.md.txt b/tests/_cli/snapshots/unsafe-doc.md.txt
index 702d9adc16..111f85afc8 100644
--- a/tests/_cli/snapshots/unsafe-doc.md.txt
+++ b/tests/_cli/snapshots/unsafe-doc.md.txt
@@ -62,4 +62,19 @@ print("Hello, World!")
````
```
--->
\ No newline at end of file
+-->
+
+<!-- from the notebook, should remain unchanged -->
+
+````{.python.marimo}
+mo.md("""
+ This is a markdown cell with an execution block in it
+ ```{python}
+ # To ambiguous to convert
+ ```
+ """)
+````
+
+```{.python.marimo}
+
+```
\ No newline at end of file
diff --git a/tests/_cli/snapshots/unsafe-doc.py.txt b/tests/_cli/snapshots/unsafe-doc.py.txt
index ce8c805dab..8fa6473866 100644
--- a/tests/_cli/snapshots/unsafe-doc.py.txt
+++ b/tests/_cli/snapshots/unsafe-doc.py.txt
@@ -131,10 +131,28 @@ def __(mo):
```
-->
+
+ <!-- from the notebook, should remain unchanged -->
"""
)
return
+def __(mo):
+ mo.md("""
+ This is a markdown cell with an execution block in it
+ ```{python}
+ # To ambiguous to convert
+ ```
+ """)
+ return
+
+
+def __():
+ return
+
+
if __name__ == "__main__":
app.run()
\ No newline at end of file
diff --git a/tests/_cli/test_markdown_conversion.py b/tests/_cli/test_markdown_conversion.py
index 1a26fd247a..2eeecc4e8c 100644
--- a/tests/_cli/test_markdown_conversion.py
+++ b/tests/_cli/test_markdown_conversion.py
@@ -284,6 +284,17 @@ def test_md_to_python_code_injection() -> None:
```
-->
+
+ <!-- from the notebook, should remain unchanged -->
+ ````{.python.marimo}
+ mo.md(\"""
+ This is a markdown cell with an execution block in it
+ ```{python}
+ # To ambiguous to convert
+ ```
+ \""")
+ ````
+
"""[1:]
)