from io import StringIO

from logbook import Logger, NullHandler, StreamHandler

log = Logger("Test logger")


def run():
    out = StringIO()
    with NullHandler():
        with StreamHandler(out, filter=lambda r, h: False) as handler:
            for x in range(500):
                log.warning("this is not handled")
    assert not out.getvalue()

17e7bfa7e15887fe3d60ce0d4eb432e849c85ecc
<mask token>

<mask token>


def run():
    out = StringIO()
    with NullHandler():
        with StreamHandler(out, filter=lambda r, h: False) as handler:
            for x in range(500):
                log.warning('this is not handled')
    assert not out.getvalue()

<mask token>
log = Logger('Test logger')


def run():
    out = StringIO()
    with NullHandler():
        with StreamHandler(out, filter=lambda r, h: False) as handler:
            for x in range(500):
                log.warning('this is not handled')
    assert not out.getvalue()

from io import StringIO
from logbook import Logger, NullHandler, StreamHandler
log = Logger('Test logger')


def run():
    out = StringIO()
    with NullHandler():
        with StreamHandler(out, filter=lambda r, h: False) as handler:
            for x in range(500):
                log.warning('this is not handled')
    assert not out.getvalue()

from io import StringIO

from logbook import Logger, NullHandler, StreamHandler

log = Logger("Test logger")


def run():
    out = StringIO()
    with NullHandler():
        with StreamHandler(out, filter=lambda r, h: False) as handler:
            for x in range(500):
                log.warning("this is not handled")
    assert not out.getvalue()
