Made sure to reset the debug file descriptors; fixed logfilesize test.

This commit is contained in:
Jeremy Fincher 2003-09-29 04:42:15 +00:00
parent f6ccc126a3
commit 6429a00a9a
2 changed files with 6 additions and 1 deletions

View File

@ -117,6 +117,7 @@ class PluginTestCase(unittest.TestCase):
os.remove(os.path.join(conf.confDir, filename)) os.remove(os.path.join(conf.confDir, filename))
for filename in os.listdir(conf.dataDir): for filename in os.listdir(conf.dataDir):
os.remove(os.path.join(conf.dataDir, filename)) os.remove(os.path.join(conf.dataDir, filename))
debug.reset()
ircdb.users.reload() ircdb.users.reload()
ircdb.channels.reload() ircdb.channels.reload()
if not self.plugins: if not self.plugins:

View File

@ -32,7 +32,8 @@
from test import * from test import *
class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation): class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
plugins = ('MiscCommands', 'Utilities', 'ChannelDB', 'Ctcp') plugins = ('MiscCommands', 'OwnerCommands',
'Utilities', 'ChannelDB', 'Ctcp')
def testReplyWhenNotCommand(self): def testReplyWhenNotCommand(self):
try: try:
conf.replyWhenNotCommand = True conf.replyWhenNotCommand = True
@ -92,6 +93,9 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
self.assertNotError('source') self.assertNotError('source')
def testLogfilesize(self): def testLogfilesize(self):
self.feedMsg('foo bar baz')
self.feedMsg('bar baz quux')
self.assertNotError('upkeep')
self.assertNotError('logfilesize') self.assertNotError('logfilesize')
def testGetprefixchar(self): def testGetprefixchar(self):