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
1 changed files with 10 additions and 1 deletions

View File

@ -31,6 +31,8 @@
from test import *
import world
class StatusTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Status', 'OwnerCommands')
def testBestuptime(self):
@ -44,7 +46,14 @@ class StatusTestCase(PluginTestCase, PluginDocumentation):
def testCpustats(self):
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):
self.assertNotError('uptime')