mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Fixed problems with cpustats on Windows; at least now an error is reported.
This commit is contained in:
parent
d6faad6775
commit
c40f5e6c59
@ -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')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user