run-tests: allow TestRunner to be passed into main()
This allows 3rd parties to specify a custom TestRunner. This is useful
for providing your own test discovery mechanism, for example.
--- a/tests/run-tests.py Sun Apr 20 00:23:06 2014 -0700
+++ b/tests/run-tests.py Sun Apr 20 09:40:27 2014 -0700
@@ -1331,8 +1331,8 @@
except KeyboardInterrupt:
self.abort[0] = True
-def main(args, parser=None):
- runner = TestRunner()
+def main(args, runner=None, parser=None):
+ runner = runner or TestRunner()
parser = parser or getparser()
(options, args) = parseargs(args, parser)