Fixed problems with cpustats on Windows; at least now an error is reported.

This commit is contained in:
Jeremy Fincher 2003-10-16 11:27:45 +00:00
parent d6faad6775
commit c40f5e6c59

View File

@ -31,6 +31,8 @@
from test import * from test import *
import world
class StatusTestCase(PluginTestCase, PluginDocumentation): class StatusTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Status', 'OwnerCommands') plugins = ('Status', 'OwnerCommands')
def testBestuptime(self): def testBestuptime(self):
@ -44,7 +46,14 @@ class StatusTestCase(PluginTestCase, PluginDocumentation):
def testCpustats(self): def testCpustats(self):
self.assertNotError('cpustats') self.assertNotError('cpustats')
try:
original = world.startedAt
world.startedAt = time.time()
self.assertError('cpustats')
world.startedAt = 0
self.assertNotError('cpustats')
finally:
world.startedAt = original
def testUptime(self): def testUptime(self):
self.assertNotError('uptime') self.assertNotError('uptime')