188
183
def run_tests(options, args):
193
186
if module_name.endswith('.py'):
194
187
module_name = module_name[:-3]
196
191
def __new__(cls, *args, **kawrgs):
197
192
return DatabaseTestRunner(database_path=options.db, runid=options.runid, module_name=module_name, verbosity=options.verbosity)
200
196
unittest.TextTestRunner = _runner
202
198
test_support.BasicTestRunner = _runner
213
206
test = defaultTestLoader.loadTestsFromName(arg)
214
207
result = _runner().run(test)
215
208
sys.exit(not result.wasSuccessful())
219
212
from threading import Timer
220
213
from mysubprocess import Popen, PIPE, STDOUT