From e2795d3ef0143e3a7fe5335687c773f2a8cad57d Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 13 Feb 2004 08:53:19 +0000 Subject: [PATCH] Fixed the failing testAddressedReplyWhenNotAddressed test. --- test/test.py | 7 +++++++ test/test_callbacks.py | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/test.py b/test/test.py index df4356d9b..bde32c117 100755 --- a/test/test.py +++ b/test/test.py @@ -48,6 +48,7 @@ supybot.log.stdout: False supybot.log.level: DEBUG supybot.log.detailedTracebacks: False supybot.throttleTime: 0 +supybot.prefixChars: @ """) fd.close() @@ -57,6 +58,7 @@ registry.open(registryFilename) import log import conf conf.allowEval = True +conf.supybot.flush.setValue(False) import fix @@ -123,6 +125,11 @@ if __name__ == '__main__': args = map(path, glob.glob(os.path.join('test', pattern))) if options.exclusions: + for (i, s) in enumerate(options.exclusions): + if not s.startswith('test/') and not s.startswith('test\\'): + s = 'test/' + s + if not s.endswith('.py'): + s += '.py' for name in map(path, options.exclusions): args = [s for s in args if s != name] diff --git a/test/test_callbacks.py b/test/test_callbacks.py index 9990a12bf..84ff948ab 100644 --- a/test/test_callbacks.py +++ b/test/test_callbacks.py @@ -154,13 +154,14 @@ class FunctionsTestCase(unittest.TestCase): msg1 = ircmsgs.privmsg('#foo', '@bar') msg2 = ircmsgs.privmsg('#foo', 'bar') self.assertEqual(callbacks.addressed('blah', msg1), 'bar') + self.assertEqual(callbacks.addressed('blah', msg2), '') try: - original = str(conf.supybot.reply.whenNotAddressed) - conf.supybot.reply.whenNotAddressed.set('True') + original = conf.supybot.reply.whenNotAddressed() + conf.supybot.reply.whenNotAddressed.setValue(True) self.assertEqual(callbacks.addressed('blah', msg1), 'bar') self.assertEqual(callbacks.addressed('blah', msg2), 'bar') finally: - conf.supybot.reply.whenNotAddressed.set(original) + conf.supybot.reply.whenNotAddressed.setValue(original) def testReply(self): prefix = 'foo!bar@baz'