changeset 688:073132fc27f1

tests: add --show-stdout option to run.py
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Wed, 08 Sep 2010 09:50:11 +0200
parents d424bd1ac647
children 35a1e93b6f78
files tests/run.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run.py
+++ b/tests/run.py
@@ -60,6 +60,9 @@ if __name__ == '__main__':
                       choices=["swig", "subvertpy"],
                       help="test using the specified bindings (swig or "
                       "subvertpy)")
+    parser.add_option("", "--show-stdout",
+                      dest="showstdout", action="store_true", default=False,
+                      help="show stdout (hidden by default)")
 
     (options, args) = parser.parse_args()
 
@@ -82,8 +85,9 @@ if __name__ == '__main__':
     test_util.TestBase
 
     # silence output when running outside nose
-    import tempfile
-    sys.stdout = tempfile.TemporaryFile()
+    if not options.showstdout:
+        import tempfile
+        sys.stdout = tempfile.TemporaryFile()
 
     all = tests()