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.

365 B
Raw Blame

Testing with doctest

You can test code snippets in docstrings using doctest, a Python module for testing code snippets in documentation. This works because marimo notebooks are just Python programs.

See this notebook for an example:

/// marimo-embed-file filepath: examples/testing/running_doctests.py ///