mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix the warnings, need to handle the repr escaping
This commit is contained in:
parent
f68c108f10
commit
db8663db06
@ -145,10 +145,9 @@ def check_extra_entries(outdir):
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='warnings')
|
||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||
def test_html_warnings(app, warning):
|
||||
app.build()
|
||||
html_warnings = strip_escseq(warning.getvalue().replace(os.sep, '/'))
|
||||
html_warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))
|
||||
html_warnings_exp = HTML_WARNINGS % {
|
||||
'root': re.escape(app.srcdir.replace(os.sep, '/'))}
|
||||
assert re.match(html_warnings_exp + '$', html_warnings), \
|
||||
|
@ -152,11 +152,10 @@ def test_writer(app, status, warning):
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', testroot='warnings', freshenv=True)
|
||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||
def test_latex_warnings(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
warnings = strip_escseq(warning.getvalue().replace(os.sep, '/'))
|
||||
warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))
|
||||
warnings_exp = LATEX_WARNINGS % {
|
||||
'root': re.escape(app.srcdir.replace(os.sep, '/'))}
|
||||
assert re.match(warnings_exp + '$', warnings), \
|
||||
|
@ -35,10 +35,9 @@ if PY3:
|
||||
|
||||
|
||||
@pytest.mark.sphinx('texinfo', testroot='warnings', freshenv=True)
|
||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||
def test_texinfo_warnings(app, status, warning):
|
||||
app.builder.build_all()
|
||||
warnings = strip_escseq(warning.getvalue().replace(os.sep, '/'))
|
||||
warnings = strip_escseq(re.sub(re.escape(os.sep) + '{1,2}', '/', warning.getvalue()))
|
||||
warnings_exp = TEXINFO_WARNINGS % {
|
||||
'root': re.escape(app.srcdir.replace(os.sep, '/'))}
|
||||
assert re.match(warnings_exp + '$', warnings), \
|
||||
|
Loading…
Reference in New Issue
Block a user