Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/p/y/Pyromancer-0.4/pyromancer/test/test_objects.py   Pyromancer(Download)
def test_match_msg_with_privmsg(c):
    line = Line(':John!JDoe@some.host PRIVMSG #Chan :Some cool message')
    match = Match(None, line, c)
    match.msg('A {} reply', 'cool')
 
    assert c.outbox[0] == 'PRIVMSG #Chan :A cool reply'
 
    line = Line(':John!JDoe@some.host PRIVMSG TestBot :Some cool message')
    match = Match(None, line, c)
    match.msg('A {} reply', 'cool')
    assert c.outbox[1] == 'PRIVMSG John :A cool reply'
 
    match.msg('A private message', target='SomeUser')
 
    assert c.outbox[2] == 'PRIVMSG SomeUser :A private message'
 
    match.msg('A {}formatted message', 'mis', raw=True)