From 28937800366f20172ac183f976f97ff2ca2ea01b Mon Sep 17 00:00:00 2001 From: Windel Bouwman Date: Thu, 11 Jul 2019 17:48:10 +0200 Subject: [PATCH] Check output of logger calls. --- tests/snippets/test_logging.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/snippets/test_logging.py b/tests/snippets/test_logging.py index ee1ac2498..035640462 100644 --- a/tests/snippets/test_logging.py +++ b/tests/snippets/test_logging.py @@ -10,5 +10,9 @@ import logging logging.error('WOOT') logging.warning('WARN') -print(f.getvalue()) +res = f.getvalue() + +assert 'WOOT' in res +assert 'WARN' in res +print(res)