From f270ba91215c3f14b1f44da0e5db0221226a5715 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 2 Oct 2016 22:31:13 -0700 Subject: Run tests under valgrind when available. Fixes #50. --- test/conftest.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/conftest.py') 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)) -- cgit v1.2.3