Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion reframe/utility/sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ def assert_found(patt, filename, msg=None, encoding='utf-8'):
Any standard Python `regular expression
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
is accepted.
The `re.MULTILINE
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
is set for the pattern search.

:arg filename: The name of the file to examine.
Any :class:`OSError` raised while processing the file will be
propagated as a :class:`reframe.core.exceptions.SanityError`.
Expand Down Expand Up @@ -503,6 +507,9 @@ def findall(patt, filename, encoding='utf-8'):
Any standard Python `regular expression
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
is accepted.
The `re.MULTILINE
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
is set for the pattern search.
:arg filename: The name of the file to examine.
:arg encoding: The name of the encoding used to decode the file.
:returns: A list of raw `regex match objects
Expand Down Expand Up @@ -556,6 +563,9 @@ def extractall(patt, filename, tag=0, conv=None, encoding='utf-8'):
Any standard Python `regular expression
<https://docs.python.org/3/library/re.html#regular-expression-syntax>`_
is accepted.
The `re.MULTILINE
<https://docs.python.org/3/library/re.html#re.MULTILINE>`_ flag
is set for the pattern search.
:arg filename: The name of the file to examine.
:arg encoding: The name of the encoding used to decode the file.
:arg tag: The regex capturing group to be extracted.
Expand Down Expand Up @@ -589,7 +599,6 @@ def extractsingle(patt, filename, tag=0, conv=None, item=0, encoding='utf-8'):
:arg item: the specific element to extract.
:returns: The extracted value.
:raises reframe.core.exceptions.SanityError: In case of errors.

'''
try:
# Explicitly evaluate the expression here, so as to force any exception
Expand Down