Commit 5271d8ba authored by Denis Bilenko's avatar Denis Bilenko

testrunner.py: fix patching of TextTestRunner on python2.7

parent 4b38b9fb
......@@ -227,6 +227,12 @@ def run_tests(options, args):
return DatabaseTestRunner(database_path=options.db, runid=options.runid, module_name=module_name, verbosity=options.verbosity)
if options.db:
try:
from unittest import runner
except ImportError:
pass
else:
runner.TextTestRunner = _runner
import unittest
unittest.TextTestRunner = _runner
import test_support
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment