Add TC to demonstrate #3297 that caplog.clear() does not clean text

This commit is contained in:
Kostis Anagnostopoulos 2018-03-13 00:28:47 +02:00
parent 3909225bf9
commit 68375513f3
1 changed files with 2 additions and 0 deletions

View File

@ -95,8 +95,10 @@ def test_clear(caplog):
caplog.set_level(logging.INFO)
logger.info(u'')
assert len(caplog.records)
assert caplog.text
caplog.clear()
assert not len(caplog.records)
assert not caplog.text
@pytest.fixture