Skip to content
Myr

fix non-passing tests for logging on pytest > 3.3.0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Camilo · committed by Camilo · parent 4556ab2 · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • tests:+6 added−0 removed

1 file+6 added−0 removed

modified:tests/test_logging.py+6 added
15 unmodified lines
16 logger = logging.getLogger('flask.app')17 logger.handlers = []18 logger.setLevel(logging.NOTSET)1920 logging_plugin = pytest.config.pluginmanager.getplugin('logging-plugin')21 pytest.config.pluginmanager.unregister(name='logging-plugin')22 logging.root.handlers = []2324 yield2526 logging.root.handlers[:] = root_handlers27 logging.root.setLevel(root_level)2829 logger.handlers = []30 logger.setLevel(logging.NOTSET)3132 pytest.config.pluginmanager.register(logging_plugin, 'logging-plugin')333435def test_logger(app):36 assert app.logger.name == 'flask.app'37 assert app.logger.level == logging.NOTSET38 assert app.logger.handlers == [default_handler]
59 unmodified lines