From 07814fc80833249bf4ae2d19a5adc0629ff9194a Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 21 Feb 2005 01:04:45 +0000 Subject: [PATCH] Fix for bug in first.__repr__. --- src/commands.py | 1 + test/test_commands.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/commands.py b/src/commands.py index 0b0fbdfe5..04b386f51 100644 --- a/src/commands.py +++ b/src/commands.py @@ -738,6 +738,7 @@ class first(context): if 'default' in kw: self.default = kw.pop('default') assert not kw, 'Bad kwargs for first.__init__' + self.spec = specs # for __repr__ self.specs = map(contextify, specs) def __call__(self, irc, msg, args, state): diff --git a/test/test_commands.py b/test/test_commands.py index aef09f3ee..952d785b2 100644 --- a/test/test_commands.py +++ b/test/test_commands.py @@ -149,5 +149,9 @@ class ConverterTestCase(CommandsTestCase): self.assertError(['email'], ['foo@']) self.assertError(['email'], ['@foo']) +class FirstTestCase(CommandsTestCase): + def testRepr(self): + self.failUnless(repr(first('int'))) + # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: