diff options
Diffstat (limited to 'test/util.py')
-rw-r--r-- | test/util.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/util.py b/test/util.py index 605269f..29225e2 100644 --- a/test/util.py +++ b/test/util.py @@ -1,7 +1,13 @@ import re + def flatten_result(result): - return re.sub(r'[\s\r\n]+', ' ', result).strip() + return re.sub(r"[\s\r\n]+", " ", result).strip() + def result_lines(result): - return [x.strip() for x in re.split(r'\r?\n', re.sub(r' +', ' ', result)) if x.strip() != '']
\ No newline at end of file + return [ + x.strip() + for x in re.split(r"\r?\n", re.sub(r" +", " ", result)) + if x.strip() != "" + ] |