Raise exception in PluginsTestCase.setUp if no self.plugins.

This commit is contained in:
Jeremy Fincher 2003-08-25 05:25:24 +00:00
parent 0f8350528b
commit 65af25467a

View File

@ -101,6 +101,8 @@ class PluginTestCase(unittest.TestCase):
timeout = 10
plugins = ()
def setUp(self, nick='test'):
if not self.plugins:
raise ValueError, 'PluginTestCase must have a "plugins" attribute.'
self.nick = nick
self.prefix = ircutils.joinHostmask(nick, 'user', 'host.domain.tld')
self.irc = irclib.Irc(nick)