diff --git a/test/test_cautodoc.py b/test/test_cautodoc.py index 2c957d3d..c23dd499 100755 --- a/test/test_cautodoc.py +++ b/test/test_cautodoc.py @@ -54,7 +54,7 @@ def _sphinx_build(self, srcdir): output_filename = os.path.join(app.outdir, f'index.{output_suffix}') # Remove paths from warning output for comparison - output_errors = re.sub(rf'(?m)^{srcdir}/index.rst:[0-9]+: ([^:]*: )(/[a-zA-Z0-9._-]+)*/', + output_errors = re.sub(rf'(?m)^.*{srcdir}/index.rst:[0-9]+: ([^:]*: )(/[a-zA-Z0-9._-]+)*/', '\\1', warning.getvalue()) return testenv.read_file(output_filename), output_errors