diff --git a/test/test_ircutils.py b/test/test_ircutils.py index 6b86215eb..a6b73b154 100644 --- a/test/test_ircutils.py +++ b/test/test_ircutils.py @@ -109,10 +109,10 @@ class FunctionsTestCase(SupyTestCase): # Test positional args self.assertEqual('\x0300foo\x03', ircutils.mircColor(s, 'white')) self.assertEqual('\x031,02foo\x03',ircutils.mircColor(s,'black','blue')) - self.assertEqual('\x03,03foo\x03', ircutils.mircColor(s, None, 'green')) + self.assertEqual('\x0300,03foo\x03', ircutils.mircColor(s, None, 'green')) # Test keyword args self.assertEqual('\x0304foo\x03', ircutils.mircColor(s, fg='red')) - self.assertEqual('\x03,05foo\x03', ircutils.mircColor(s, bg='brown')) + self.assertEqual('\x0300,05foo\x03', ircutils.mircColor(s, bg='brown')) self.assertEqual('\x036,07foo\x03', ircutils.mircColor(s, bg='orange', fg='purple')) @@ -203,8 +203,8 @@ class FunctionsTestCase(SupyTestCase): self.failIf(ircutils.isNick('foo bar')) finally: conf.supybot.protocols.irc.strictRfc.setValue(original) - - + + def testBanmask(self): for msg in msgs: @@ -229,7 +229,7 @@ class FunctionsTestCase(SupyTestCase): def testNickFromHostmask(self): self.assertEqual(ircutils.nickFromHostmask('nick!user@host.domain.tld'), 'nick') - + def testToLower(self): self.assertEqual('jemfinch', ircutils.toLower('jemfinch')) self.assertEqual('{}|^', ircutils.toLower('[]\\~')) diff --git a/test/test_utils.py b/test/test_utils.py index 77b472d32..59c0b7e13 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -136,11 +136,11 @@ class GenTest(SupyTestCase): def testSorted(self): L = ['a', 'c', 'b'] - self.assertEqual(utils.sorted(L), ['a', 'b', 'c']) + self.assertEqual(sorted(L), ['a', 'b', 'c']) self.assertEqual(L, ['a', 'c', 'b']) def mycmp(x, y): return -cmp(x, y) - self.assertEqual(utils.sorted(L, mycmp), ['c', 'b', 'a']) + self.assertEqual(sorted(L, mycmp), ['c', 'b', 'a']) def testTimeElapsed(self): self.assertRaises(ValueError, utils.timeElapsed, 0, @@ -391,7 +391,7 @@ class IterTest(SupyTestCase): self.assertEqual([0, 1], list(utils.iter.limited(L, 2))) self.assertEqual(range(10), list(utils.iter.limited(L, 10))) self.assertRaises(ValueError, list, utils.iter.limited(L, 11)) - + def testRandomChoice(self): choice = utils.iter.choice self.assertRaises(IndexError, choice, {})