Fix the warnings, need to handle the repr escaping

This commit is contained in:
Andy Neebel
2017-05-01 16:19:53 -05:00
parent f68c108f10
commit db8663db06
3 changed files with 3 additions and 6 deletions

View File

@@ -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), \