Skip to content

What's the best current approach for testing marimo notebooks? #573

Answered by mscolnick
superlopuh asked this question in Q&A
Discussion options

You must be logged in to vote

We currently don't have a way to do this exactly how you do it with Jupyter. But we have some alternatives of testing your notebooks in CI.

  1. You can run marimo as a script (see docs here). If your cells output anything to stdout, you could capture that output and snapshot
  2. Again, running as a script, you can just make sure it runs correctly with a non-error exit code.
  3. Since the notebooks are stored as py files, you can also type-check the file

Right now to generate the outputs, it requires spinning up a browser. We plan to make some architectural changes in future that will allow use to do something like generate the outputs via the CLI.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by superlopuh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants