It would be useful to be able to doctest myst-nb notebooks within a sphinx project. For example, sphinx.ext.doctest provides the testcode and testoutput directives that let you do something like this in myst-md:
```{testcode}
1 + 2
```
```{testoutput}
4
```
It would be nice if a similar mechanism existed to specify expected outputs for myst-nb code-cells; e.g.
```{code-cell}
1 + 1
```
```{code-cell-output}
2
```
If this were automatically tested in the same way that testcode and testoutput are, it would make it easier to detect when myst-nb docs get stale.
It would be useful to be able to doctest myst-nb notebooks within a sphinx project. For example, sphinx.ext.doctest provides the
testcodeandtestoutputdirectives that let you do something like this inmyst-md:It would be nice if a similar mechanism existed to specify expected outputs for myst-nb code-cells; e.g.
If this were automatically tested in the same way that
testcodeandtestoutputare, it would make it easier to detect when myst-nb docs get stale.