mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Honor supybot-test's timeout option and document the units
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
fb66be5968
commit
5ada9193b9
@ -2,6 +2,7 @@
|
||||
|
||||
###
|
||||
# Copyright (c) 2002-2005, Jeremiah Fincher
|
||||
# Copyright (c) 2011, James Vega
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -122,9 +123,10 @@ if __name__ == '__main__':
|
||||
parser.add_option('-c', '--clean', action='store_true', default=False,
|
||||
dest='clean', help='Cleans the various data/conf/logs'
|
||||
'directories before running tests.')
|
||||
parser.add_option('-t', '--timeout', action='store', type='int',
|
||||
parser.add_option('-t', '--timeout', action='store', type='float',
|
||||
dest='timeout',
|
||||
help='Sets the timeout for tests to return responses.')
|
||||
help='Sets the timeout, in seconds, for tests to return '
|
||||
'responses.')
|
||||
parser.add_option('-v', '--verbose', action='store_true', default=False,
|
||||
help='Sets the verbose flag, logging extra information '
|
||||
'about each test that runs.')
|
||||
|
@ -1,5 +1,6 @@
|
||||
###
|
||||
# Copyright (c) 2002-2005, Jeremiah Fincher
|
||||
# Copyright (c) 2011, James Vega
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -60,6 +61,8 @@ network = True
|
||||
# This is the global list of suites that are to be run.
|
||||
suites = []
|
||||
|
||||
timeout = 10
|
||||
|
||||
originalCallbacksGetHelp = callbacks.getHelp
|
||||
lastGetHelp = 'x' * 1000
|
||||
def cachingGetHelp(method, name=None, doc=None):
|
||||
@ -116,12 +119,12 @@ class PluginTestCase(SupyTestCase):
|
||||
"""Subclass this to write a test case for a plugin. See
|
||||
plugins/Plugin/test.py for an example.
|
||||
"""
|
||||
timeout = 10
|
||||
plugins = None
|
||||
cleanConfDir = True
|
||||
cleanDataDir = True
|
||||
config = {}
|
||||
def __init__(self, methodName='runTest'):
|
||||
self.timeout = timeout
|
||||
originalRunTest = getattr(self, methodName)
|
||||
def runTest(self):
|
||||
run = True
|
||||
|
Loading…
Reference in New Issue
Block a user