Fix for bug in first.__repr__.

This commit is contained in:
Jeremy Fincher 2005-02-21 01:04:45 +00:00
parent 06a6656dc7
commit 07814fc808
2 changed files with 5 additions and 0 deletions

View File

@ -738,6 +738,7 @@ class first(context):
if 'default' in kw: if 'default' in kw:
self.default = kw.pop('default') self.default = kw.pop('default')
assert not kw, 'Bad kwargs for first.__init__' assert not kw, 'Bad kwargs for first.__init__'
self.spec = specs # for __repr__
self.specs = map(contextify, specs) self.specs = map(contextify, specs)
def __call__(self, irc, msg, args, state): def __call__(self, irc, msg, args, state):

View File

@ -149,5 +149,9 @@ class ConverterTestCase(CommandsTestCase):
self.assertError(['email'], ['foo@']) self.assertError(['email'], ['foo@'])
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: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: