Add TC to demonstrate #3297 that caplog.clear() does not clean text
This commit is contained in:
parent
3909225bf9
commit
68375513f3
|
@ -95,8 +95,10 @@ def test_clear(caplog):
|
||||||
caplog.set_level(logging.INFO)
|
caplog.set_level(logging.INFO)
|
||||||
logger.info(u'bū')
|
logger.info(u'bū')
|
||||||
assert len(caplog.records)
|
assert len(caplog.records)
|
||||||
|
assert caplog.text
|
||||||
caplog.clear()
|
caplog.clear()
|
||||||
assert not len(caplog.records)
|
assert not len(caplog.records)
|
||||||
|
assert not caplog.text
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Reference in New Issue