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: