diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-02 22:31:13 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-02 22:39:28 -0700 |
commit | f270ba91215c3f14b1f44da0e5db0221226a5715 (patch) | |
tree | 479bc0aa678286a59208e5b71c2c1fea39c88690 /test/conftest.py | |
parent | 651f85e4a2ef100ced3235ab1827c9ec9a509c43 (diff) |
Run tests under valgrind when available.
Fixes #50.
Diffstat (limited to 'test/conftest.py')
-rw-r--r-- | test/conftest.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/conftest.py b/test/conftest.py index 0da2f4b..70cd0c6 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -35,9 +35,13 @@ def check_test_output(capfd): if count == 0 or count - cnt > 0: stderr = cp.sub('', stderr, count=count - cnt) - for pattern in ('exception', 'error', 'warning', 'fatal', 'traceback', - 'fault', 'crash(?:ed)?', 'abort(?:ed)'): - cp = re.compile(r'\b{}\b'.format(pattern), re.IGNORECASE | re.MULTILINE) + patterns = [ r'\b{}\b'.format(x) for x in + ('exception', 'error', 'warning', 'fatal', 'traceback', + 'fault', 'crash(?:ed)?', 'abort(?:ed)', + 'uninitiali[zs]ed') ] + patterns += ['^==[0-9]+== '] + for pattern in patterns: + cp = re.compile(pattern, re.IGNORECASE | re.MULTILINE) hit = cp.search(stderr) if hit: raise AssertionError('Suspicious output to stderr (matched "%s")' % hit.group(0)) |