mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Added rawmsgs, msgs, and getMsgs for easy test messages.
This commit is contained in:
parent
eed4d68485
commit
d0a569eb31
12
test/test.py
12
test/test.py
@ -40,6 +40,18 @@ import glob
|
|||||||
import os.path
|
import os.path
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import ircmsgs
|
||||||
|
|
||||||
|
fd = file(os.path.join('test', 'rfc2812.msgs'), 'r')
|
||||||
|
rawmsgs = [line.strip() for line in fd]
|
||||||
|
fd.close()
|
||||||
|
|
||||||
|
msgs = [ircmsgs.IrcMsg(s) for s in rawmsgs]
|
||||||
|
|
||||||
|
def getMsgs(command):
|
||||||
|
return [msg for msg in msgs if msg.command == command]
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
files = sys.argv[1:]
|
files = sys.argv[1:]
|
||||||
|
Loading…
Reference in New Issue
Block a user