Skip to content

Commit f53604b

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1425 from teojgo/doc/sanity_re_multiline
[doc] Document that sanity functions use 're.MULTILINE'
2 parents 7a7f956 + cb9960c commit f53604b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

reframe/utility/sanity.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ def assert_found(patt, filename, msg=None, encoding='utf-8'):
363363
Any standard Python `regular expression
364364
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
365365
is accepted.
366+
The `re.MULTILINE
367+
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
368+
is set for the pattern search.
369+
366370
:arg filename: The name of the file to examine.
367371
Any :class:`OSError` raised while processing the file will be
368372
propagated as a :class:`reframe.core.exceptions.SanityError`.
@@ -503,6 +507,9 @@ def findall(patt, filename, encoding='utf-8'):
503507
Any standard Python `regular expression
504508
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
505509
is accepted.
510+
The `re.MULTILINE
511+
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
512+
is set for the pattern search.
506513
:arg filename: The name of the file to examine.
507514
:arg encoding: The name of the encoding used to decode the file.
508515
:returns: A list of raw `regex match objects
@@ -556,6 +563,9 @@ def extractall(patt, filename, tag=0, conv=None, encoding='utf-8'):
556563
Any standard Python `regular expression
557564
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
558565
is accepted.
566+
The `re.MULTILINE
567+
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
568+
is set for the pattern search.
559569
:arg filename: The name of the file to examine.
560570
:arg encoding: The name of the encoding used to decode the file.
561571
:arg tag: The regex capturing group to be extracted.
@@ -589,7 +599,6 @@ def extractsingle(patt, filename, tag=0, conv=None, item=0, encoding='utf-8'):
589599
:arg item: the specific element to extract.
590600
:returns: The extracted value.
591601
:raises reframe.core.exceptions.SanityError: In case of errors.
592-
593602
'''
594603
try:
595604
# Explicitly evaluate the expression here, so as to force any exception

0 commit comments

Comments
 (0)