mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix the test suite.
This commit is contained in:
@@ -100,7 +100,7 @@ class NslessParser(ET.XMLParser):
|
||||
return name
|
||||
|
||||
|
||||
@with_app(buildername='html', warning=html_warnfile)
|
||||
@with_app(buildername='html', warning=html_warnfile, cleanenv=True)
|
||||
def test_html(app):
|
||||
app.builder.build_all()
|
||||
html_warnings = html_warnfile.getvalue().replace(os.sep, '/')
|
||||
@@ -127,7 +127,7 @@ def test_html(app):
|
||||
'path %s in %s' % (text, path, fname))
|
||||
|
||||
|
||||
@with_app(buildername='latex', warning=latex_warnfile)
|
||||
@with_app(buildername='latex', warning=latex_warnfile, cleanenv=True)
|
||||
def test_latex(app):
|
||||
LaTeXTranslator.ignore_missing_images = True
|
||||
app.builder.build_all()
|
||||
@@ -183,11 +183,11 @@ def test_latex(app):
|
||||
|
||||
# just let the remaining ones run for now
|
||||
|
||||
@with_app(buildername='linkcheck')
|
||||
@with_app(buildername='linkcheck', cleanenv=True)
|
||||
def test_linkcheck(app):
|
||||
app.builder.build_all()
|
||||
|
||||
@with_app(buildername='text')
|
||||
@with_app(buildername='text', cleanenv=True)
|
||||
def test_text(app):
|
||||
app.builder.build_all()
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ from sphinx.latexwriter import LaTeXWriter, LaTeXTranslator
|
||||
def setup_module():
|
||||
global app, settings, parser
|
||||
app = TestApp(cleanenv=True)
|
||||
optparser = frontend.OptionParser(components=(rst.Parser, HTMLWriter, LaTeXWriter))
|
||||
optparser = frontend.OptionParser(
|
||||
components=(rst.Parser, HTMLWriter, LaTeXWriter))
|
||||
settings = optparser.get_default_values()
|
||||
settings.env = app.builder.env
|
||||
parser = rst.Parser()
|
||||
@@ -47,6 +48,7 @@ class ForgivingLaTeXTranslator(LaTeXTranslator, ForgivingTranslator):
|
||||
|
||||
def verify_re(rst, html_expected, latex_expected):
|
||||
document = utils.new_document('test data', settings)
|
||||
document['file'] = 'dummy'
|
||||
parser.parse(rst, document)
|
||||
for msg in document.traverse(nodes.system_message):
|
||||
if msg['level'] == 1:
|
||||
|
||||
Reference in New Issue
Block a user