Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2226037

Browse files
committed
Adjust regexps for random tests
1 parent 7e1a3ed commit 2226037

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

IPython/testing/plugin/ipdoctest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class IPDoctestOutputChecker(doctest.OutputChecker):
257257
output string for flags that tell us to ignore the output.
258258
"""
259259

260-
random_re = re.compile(r'#\s*random')
260+
random_re = re.compile(r'#\s*random\s+')
261261

262262
def check_output(self, want, got, optionflags):
263263
"""Check output, accepting special markers embedded in the output.
@@ -403,7 +403,7 @@ class IPDocTestParser(doctest.DocTestParser):
403403
# Mark a test as being fully random. In this case, we simply append the
404404
# random marker ('#random') to each individual example's output. This way
405405
# we don't need to modify any other code.
406-
_RANDOM_TEST = re.compile(r'#\s*all-random')
406+
_RANDOM_TEST = re.compile(r'#\s*all-random\s+')
407407

408408
# Mark tests to be executed in an external process - currently unsupported.
409409
_EXTERNAL_IP = re.compile(r'#\s*ipdoctest:\s*EXTERNAL')

0 commit comments

Comments
 (0)