changeset 21364:558246fa98b8

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 09:40:27 -0700
parents 00e5f5b9fc90
children 10cf9054d941
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)