def test_captured_logging():
    logger = logging.getLogger()
    handlers = logger.handlers
    with captured_logging() as buf:
        logger.debug('Hello world!')
    assert 'Hello world!' in buf.getvalue()
    assert logger.handlers == handlers
dataset/ETHPy150Open kwikteam/phy/phy/utils/tests/test_testing.py/test_captured_logging/original