

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 == buf)

dataset/ETHPy150Open kwikteam/phy/phy/utils/tests/test_testing.py test_captured_logging/VarMisuse@57/73 `handlers`->`buf`