File: test_extension.py

package info (click to toggle)
sphinxcontrib-runcmd 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 136 kB
  • sloc: python: 152; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from sphinx_testing import with_app


@with_app(buildername="html", srcdir="./tests/examples", copy_srcdir_to_tmpdir=True)
def sphinx_build(app, status, warning):
    app.build()
    with open(app.outdir + "/index.html", "r") as f:
        html = f.read()
    assert "python test.py -h" in html
    assert "No such file or directory" in html


def test_build():
    sphinx_build()