def test_oneWord(self): """ Splitting strings with one-word phrases. """ s = 'This code "works."' r = text.splitQuoted(s) self.assertEqual(["This", "code", "works."], r)
def test_oneWord(self): """ Splitting strings with one-word phrases. """ s = 'This code "works."' r = text.splitQuoted(s) self.assertEqual(['This', 'code', 'works.'], r)
def dcc_CHAT(self, user, channel, data): data = text.splitQuoted(data) if len(data) < 3: raise IRCBadMessage("malformed DCC CHAT request: %r" % (data, )) (protocol, address, port) = data[:3] address = irc.dccParseAddress(address) try: port = int(port) except ValueError: raise irc.IRCBadMessage("Indecipherable port %r" % (port, )) self.dccDoChat(user, channel, protocol, address, port, data)
def dcc_CHAT(self, user, channel, data): data = text.splitQuoted(data) if len(data) < 3: raise IRCBadMessage("malformed DCC CHAT request: %r" % (data,)) (protocol, address, port) = data[:3] address = irc.dccParseAddress(address) try: port = int(port) except ValueError: raise irc.IRCBadMessage("Indecipherable port %r" % (port,)) self.dccDoChat(user, channel, protocol, address, port, data)
def test_multiWord(self): s = 'The "hairy monkey" likes pie.' r = text.splitQuoted(s) self.assertEqual(['The', 'hairy monkey', 'likes', 'pie.'], r)
def test_multiWord(self): s = 'The "hairy monkey" likes pie.' r = text.splitQuoted(s) self.assertEqual(["The", "hairy monkey", "likes", "pie."], r)
def test_multiWord(self): s = 'The "hairy monkey" likes pie.' r = text.splitQuoted(s) self.failUnlessEqual(['The', 'hairy monkey', 'likes', 'pie.'], r)
def test_multiWord(self): s = 'The "hairy monkey" likes pie.' r = text.splitQuoted(s) self.failUnlessEqual(["The", "hairy monkey", "likes", "pie."], r)
def test_oneWord(self): """Splitting strings with one-word phrases.""" s = 'This code "works."' r = text.splitQuoted(s) self.failUnlessEqual(["This", "code", "works."], r)
def test_oneWord(self): """Splitting strings with one-word phrases.""" s = 'This code "works."' r = text.splitQuoted(s) self.failUnlessEqual(['This', 'code', 'works.'], r)