File: test_eval.py

package info (click to toggle)
myst-nb 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,452 kB
  • sloc: python: 6,066; xml: 1,434; makefile: 33
file content (17 lines) | stat: -rw-r--r-- 524 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Test the `eval` directives and roles."""

import pytest


@pytest.mark.sphinx_params("with_eval.md", conf={"nb_execution_mode": "inline"})
def test_sphinx(sphinx_run, clean_doctree, file_regression):
    """Test a sphinx build."""
    sphinx_run.build()
    # print(sphinx_run.status())
    # print(sphinx_run.warnings())
    assert sphinx_run.warnings() == ""
    doctree = clean_doctree(sphinx_run.get_resolved_doctree("with_eval"))
    file_regression.check(
        doctree.pformat(),
        encoding="utf-8",
    )