From 33fa58094701d5b1edbf13ddfe7c93b4c5821b63 Mon Sep 17 00:00:00 2001 From: Camilo Date: Thu, 14 Dec 2017 09:40:34 -0500 Subject: [PATCH] restore the logging plugin only if it was active to begin with --- tests/test_logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_logging.py b/tests/test_logging.py index cadcdab9..be4e76ca 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -29,7 +29,8 @@ def reset_logging(monkeypatch): logger.handlers = [] logger.setLevel(logging.NOTSET) - pytest.config.pluginmanager.register(logging_plugin, 'logging-plugin') + if logging_plugin: + pytest.config.pluginmanager.register(logging_plugin, 'logging-plugin') def test_logger(app):