From 68375513f300e51c4ee97172a4dc4728e89d898a Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Tue, 13 Mar 2018 00:28:47 +0200 Subject: [PATCH] Add TC to demonstrate #3297 that caplog.clear() does not clean text --- testing/logging/test_fixture.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py index 204472c80..24576719d 100644 --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -95,8 +95,10 @@ def test_clear(caplog): caplog.set_level(logging.INFO) logger.info(u'bū') assert len(caplog.records) + assert caplog.text caplog.clear() assert not len(caplog.records) + assert not caplog.text @pytest.fixture