def test_setconsumer_with_producer(self):
l = []
-> p = py.log.Producer("hello")
py.log.setconsumer(p, l.append)
p("world")
assert str(l[0]) == "[hello] world"