mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
tests: raw strings for better readability.
This commit is contained in:
parent
1854d86476
commit
f4d5b866d9
@ -135,8 +135,8 @@ class IrcMsgTestCase(SupyTestCase):
|
|||||||
self.assertEqual(m.repliedTo, 12)
|
self.assertEqual(m.repliedTo, 12)
|
||||||
|
|
||||||
def testServerTags(self):
|
def testServerTags(self):
|
||||||
s = '@aaa=b\\:bb;ccc;example.com/ddd=ee\\\\se ' \
|
s = r'@aaa=b\:bb;ccc;example.com/ddd=ee\\se ' \
|
||||||
':nick!ident@host.com PRIVMSG me :Hello'
|
r':nick!ident@host.com PRIVMSG me :Hello'
|
||||||
m = ircmsgs.IrcMsg(s)
|
m = ircmsgs.IrcMsg(s)
|
||||||
self.assertEqual(m.server_tags, {
|
self.assertEqual(m.server_tags, {
|
||||||
'aaa': 'b;bb',
|
'aaa': 'b;bb',
|
||||||
@ -149,8 +149,8 @@ class IrcMsgTestCase(SupyTestCase):
|
|||||||
m._str = None # Clear the cache (set before parsing)
|
m._str = None # Clear the cache (set before parsing)
|
||||||
self.assertEqual(str(m), s + '\r\n')
|
self.assertEqual(str(m), s + '\r\n')
|
||||||
|
|
||||||
s = '@foo=;bar=baz;qux= ' \
|
s = r'@foo=;bar=baz;qux= ' \
|
||||||
':nick!ident@host.com PRIVMSG me :Hello'
|
r':nick!ident@host.com PRIVMSG me :Hello'
|
||||||
m = ircmsgs.IrcMsg(s)
|
m = ircmsgs.IrcMsg(s)
|
||||||
self.assertEqual(m.server_tags, {
|
self.assertEqual(m.server_tags, {
|
||||||
'foo': None,
|
'foo': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user