diff options
Diffstat (limited to 'tests/test_api_translator.py')
-rw-r--r-- | tests/test_api_translator.py | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/test_api_translator.py b/tests/test_api_translator.py index 3d346cda1..f1c70a671 100644 --- a/tests/test_api_translator.py +++ b/tests/test_api_translator.py @@ -11,7 +11,8 @@ import sys -from util import with_app, rootdir +import pytest +from util import rootdir def setup_module(): @@ -22,7 +23,7 @@ def teardown_module(): sys.path.remove(rootdir / 'roots' / 'test-api-set-translator') -@with_app('html') +@pytest.mark.sphinx('html') def test_html_translator(app, status, warning): # no set_translator() translator_class = app.builder.translator_class @@ -30,8 +31,8 @@ def test_html_translator(app, status, warning): assert translator_class.__name__ == 'SmartyPantsHTMLTranslator' -@with_app('html', - confoverrides={'html_use_smartypants': False}) +@pytest.mark.sphinx('html', confoverrides={ + 'html_use_smartypants': False}) def test_html_with_smartypants(app, status, warning): # no set_translator(), html_use_smartypants=False translator_class = app.builder.translator_class @@ -39,7 +40,7 @@ def test_html_with_smartypants(app, status, warning): assert translator_class.__name__ == 'HTMLTranslator' -@with_app('html', testroot='api-set-translator') +@pytest.mark.sphinx('html', testroot='api-set-translator') def test_html_with_set_translator_for_html_(app, status, warning): # use set_translator() translator_class = app.builder.translator_class @@ -48,7 +49,7 @@ def test_html_with_set_translator_for_html_(app, status, warning): # this test break test_websupport.test_comments test. why? -# @with_app( +# @pytest.mark.sphinx( # buildername='dirhtml', # srcdir=(test_roots / 'test-api-set-translator'), # ) @@ -58,63 +59,63 @@ def test_html_with_set_translator_for_html_(app, status, warning): # assert translator_class.__name__ == 'ConfDirHTMLTranslator' -@with_app('singlehtml', testroot='api-set-translator') +@pytest.mark.sphinx('singlehtml', testroot='api-set-translator') def test_singlehtml_set_translator_for_singlehtml(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfSingleHTMLTranslator' -@with_app('pickle', testroot='api-set-translator') +@pytest.mark.sphinx('pickle', testroot='api-set-translator') def test_pickle_set_translator_for_pickle(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfPickleTranslator' -@with_app('json', testroot='api-set-translator') +@pytest.mark.sphinx('json', testroot='api-set-translator') def test_json_set_translator_for_json(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfJsonTranslator' -@with_app('latex', testroot='api-set-translator') +@pytest.mark.sphinx('latex', testroot='api-set-translator') def test_html_with_set_translator_for_latex(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfLaTeXTranslator' -@with_app('man', testroot='api-set-translator') +@pytest.mark.sphinx('man', testroot='api-set-translator') def test_html_with_set_translator_for_man(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfManualPageTranslator' -@with_app('texinfo', testroot='api-set-translator') +@pytest.mark.sphinx('texinfo', testroot='api-set-translator') def test_html_with_set_translator_for_texinfo(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfTexinfoTranslator' -@with_app('text', testroot='api-set-translator') +@pytest.mark.sphinx('text', testroot='api-set-translator') def test_html_with_set_translator_for_text(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfTextTranslator' -@with_app('xml', testroot='api-set-translator') +@pytest.mark.sphinx('xml', testroot='api-set-translator') def test_html_with_set_translator_for_xml(app, status, warning): translator_class = app.builder.translator_class assert translator_class assert translator_class.__name__ == 'ConfXMLTranslator' -@with_app('pseudoxml', testroot='api-set-translator') +@pytest.mark.sphinx('pseudoxml', testroot='api-set-translator') def test_html_with_set_translator_for_pseudoxml(app, status, warning): translator_class = app.builder.translator_class assert translator_class |