| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 | |
def test_produce_one_keyword(self): |
l = [] |
py.log.setconsumer('s1', l.append) |
-> py.log.Producer('s1')("hello world") |
assert len(l) == 1 |
msg = l[0] |
assert msg.content().startswith('hello world') |
assert msg.prefix() == '[s1] ' |
assert str(msg) == "[s1] hello world" | |