Added cleanConfDir and cleanDataDir to PluginTestCase.

This commit is contained in:
Jeremy Fincher 2003-10-20 16:19:03 +00:00
parent c8fd603129
commit 3beb83f963

View File

@ -112,10 +112,14 @@ class PluginTestCase(unittest.TestCase):
"""
timeout = 10
plugins = ()
cleanConfDir = True
cleanDataDir = True
def setUp(self, nick='test'):
self.myVerbose = world.myVerbose
if self.cleanConfDir:
for filename in os.listdir(conf.confDir):
os.remove(os.path.join(conf.confDir, filename))
if self.cleanDataDir:
for filename in os.listdir(conf.dataDir):
os.remove(os.path.join(conf.dataDir, filename))
debug.reset()
@ -308,6 +312,7 @@ class PluginDocumentation:
if cb.isCommand(attr):
self.failUnless(getattr(cb, attr).__doc__,
'%s has no syntax' % attr)
def testAllCommandsHaveMorehelp(self):
for cb in self.irc.callbacks:
if isinstance(cb, callbacks.PrivmsgRegexp):