aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/testutils
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-03-26 16:47:20 +0100
committerGuido Günther <agx@sigxcpu.org>2015-03-27 12:16:31 +0100
commit0b98c48cbe28a01e325d4877ab76395db6548461 (patch)
tree892d1086ad44756abcea3ccaa031304d2800986c /tests/testutils
parent8de3ae9567e821ad8432f67afd8756b35189ecba (diff)
gbplogtester: add helper to test for empty log
Diffstat (limited to 'tests/testutils')
-rw-r--r--tests/testutils/gbplogtester.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testutils/gbplogtester.py b/tests/testutils/gbplogtester.py
index 2f2f43e0..9a54f025 100644
--- a/tests/testutils/gbplogtester.py
+++ b/tests/testutils/gbplogtester.py
@@ -37,6 +37,11 @@ class GbpLogTester(object):
self._log.seek(0)
return self._log.readlines()
+ def _check_log_empty(self):
+ """Check that nothig was logged"""
+ output = self._get_log()
+ ok_(output == [], "Log is not empty: %s" % output)
+
def _check_log(self, linenum, regex):
"""Check that the specified line on log matches expectations"""
if self._log is None: