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: add missing test cli (#2563)

Myles Scolnickd63483991704
diff --git a/.github/workflows/test_cli.yaml b/.github/workflows/test_cli.yaml
index 82ea72043c..59fc8770bd 100644
--- a/.github/workflows/test_cli.yaml
+++ b/.github/workflows/test_cli.yaml
@@ -132,11 +132,7 @@ jobs:
- name: Test CLI
shell: bash
run: |
- pytest -v \
- tests/_cli/test_cli.py \
- tests/_cli/test_cli_export.py \
- tests/_cli/test_cli_config.py \
- tests/_cli/test_cli_development.py
+ pytest -v tests/_cli/test_cli*
test_examples:
needs: [changes, build_wheel]
diff --git a/tests/_cli/snapshots/ipynb_to_marimo.txt b/tests/_cli/snapshots/ipynb_to_marimo.txt
index 8cd2900fc0..062512c9e3 100644
--- a/tests/_cli/snapshots/ipynb_to_marimo.txt
+++ b/tests/_cli/snapshots/ipynb_to_marimo.txt
@@ -1,6 +1,6 @@
import marimo
-__generated_with = "0.9.4"
+
app = marimo.App()
diff --git a/tests/_cli/snapshots/ipynb_to_marimo_with_output.txt b/tests/_cli/snapshots/ipynb_to_marimo_with_output.txt
index 58b33e5492..c33d731a61 100644
--- a/tests/_cli/snapshots/ipynb_to_marimo_with_output.txt
+++ b/tests/_cli/snapshots/ipynb_to_marimo_with_output.txt
@@ -1,6 +1,6 @@
import marimo
-__generated_with = "0.9.4"
+
app = marimo.App()
diff --git a/tests/_cli/snapshots/markdown_to_marimo.txt b/tests/_cli/snapshots/markdown_to_marimo.txt
index 15560a3698..fd3f037aaa 100644
--- a/tests/_cli/snapshots/markdown_to_marimo.txt
+++ b/tests/_cli/snapshots/markdown_to_marimo.txt
@@ -1,6 +1,6 @@
import marimo
-__generated_with = "0.9.4"
+
app = marimo.App()
diff --git a/tests/_cli/test_cli_convert.py b/tests/_cli/test_cli_convert.py
index 78ed28f622..972b230043 100644
--- a/tests/_cli/test_cli_convert.py
+++ b/tests/_cli/test_cli_convert.py
@@ -1,6 +1,7 @@
# Copyright 2024 Marimo. All rights reserved.
from __future__ import annotations
+import re
import subprocess
from typing import TYPE_CHECKING
@@ -43,6 +44,7 @@ class TestConvert:
)
assert p.returncode == 0, p.stderr
output = p.stdout
+ output = re.sub(r"__generated_with = .*", "", output)
snapshot("ipynb_to_marimo.txt", output)
@staticmethod
@@ -62,6 +64,7 @@ print('Hello from Markdown!')
)
assert p.returncode == 0, p.stderr
output = p.stdout
+ output = re.sub(r"__generated_with = .*", "", output)
snapshot("markdown_to_marimo.txt", output)
@staticmethod
@@ -96,6 +99,7 @@ print('Hello from Markdown!')
assert p.returncode == 0, p.stderr
assert output_path.exists()
output_content = output_path.read_text()
+ output_content = re.sub(r"__generated_with = .*", "", output_content)
snapshot("ipynb_to_marimo_with_output.txt", output_content)
@staticmethod