diff options
Diffstat (limited to 'tests/test_docutilsconf.py')
-rw-r--r-- | tests/test_docutilsconf.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/test_docutilsconf.py b/tests/test_docutilsconf.py index ebd0782bd..89ec63107 100644 --- a/tests/test_docutilsconf.py +++ b/tests/test_docutilsconf.py @@ -11,14 +11,15 @@ import re -from util import with_app, path, SkipTest +import pytest +from util import path, SkipTest def regex_count(expr, result): return len(re.findall(expr, result)) -@with_app('html', testroot='docutilsconf', freshenv=True, docutilsconf='') +@pytest.mark.sphinx('html', testroot='docutilsconf', freshenv=True, docutilsconf='') def test_html_with_default_docutilsconf(app, status, warning): app.builder.build(['contents']) result = (app.outdir / 'contents.html').text(encoding='utf-8') @@ -29,7 +30,7 @@ def test_html_with_default_docutilsconf(app, status, warning): assert regex_count(r'<td class="option-group" colspan="2">', result) == 1 -@with_app('html', testroot='docutilsconf', freshenv=True, docutilsconf=( +@pytest.mark.sphinx('html', testroot='docutilsconf', freshenv=True, docutilsconf=( '\n[html4css1 writer]' '\noption-limit:1' '\nfield-name-limit:1' @@ -45,31 +46,31 @@ def test_html_with_docutilsconf(app, status, warning): assert regex_count(r'<td class="option-group" colspan="2">', result) == 2 -@with_app('html', testroot='docutilsconf') +@pytest.mark.sphinx('html', testroot='docutilsconf') def test_html(app, status, warning): app.builder.build(['contents']) assert warning.getvalue() == '' -@with_app('latex', testroot='docutilsconf') +@pytest.mark.sphinx('latex', testroot='docutilsconf') def test_latex(app, status, warning): app.builder.build(['contents']) assert warning.getvalue() == '' -@with_app('man', testroot='docutilsconf') +@pytest.mark.sphinx('man', testroot='docutilsconf') def test_man(app, status, warning): app.builder.build(['contents']) assert warning.getvalue() == '' -@with_app('texinfo', testroot='docutilsconf') +@pytest.mark.sphinx('texinfo', testroot='docutilsconf') def test_texinfo(app, status, warning): app.builder.build(['contents']) -@with_app('html', testroot='docutilsconf', - docutilsconf='[general]\nsource_link=true\n') +@pytest.mark.sphinx('html', testroot='docutilsconf', + docutilsconf='[general]\nsource_link=true\n') def test_docutils_source_link_with_nonascii_file(app, status, warning): srcdir = path(app.srcdir) mb_name = u'\u65e5\u672c\u8a9e' |