From d76312c4b78983ac8df8a1912684cab1c8bc43ea Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Tue, 12 Jul 2022 06:00:51 -0500 Subject: [PATCH] Use verbose regular expression --- pytest_sphinx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest_sphinx.py b/pytest_sphinx.py index d3c6de3..d55cbc7 100644 --- a/pytest_sphinx.py +++ b/pytest_sphinx.py @@ -70,9 +70,9 @@ def _is_doctest(config, path, parent): _OPTION_SKIPIF_RE = re.compile(r':skipif:\s*([^\n\'"]*)$') _DIRECTIVE_RE = re.compile( - r"\s*\.\. (" - r"testcode|testoutput|testsetup|testcleanup|doctest" - r')::\s*([^\n\'"]*)$' + r"\s*\.\.\s" + r"(testcode|testoutput|testsetup|testcleanup|doctest)" + r'::\s*([^\n\'"]*)$', re.VERBOSE )