Watcher: fix some doc typos
[ganeti-local] / test / testutils.py
index 5e36a17..fd95c76 100644 (file)
 """Utilities for unit testing"""
 
 import os
+import sys
 import stat
 import tempfile
 import unittest
+import logging
 
 from ganeti import utils
 
@@ -33,6 +35,19 @@ def GetSourceDir():
   return os.environ.get("TOP_SRCDIR", ".")
 
 
+class GanetiTestProgram(unittest.TestProgram):
+  def runTests(self):
+    """
+
+    """
+    logging.basicConfig(filename=os.devnull)
+
+    sys.stderr.write("Running %s\n" % self.progName)
+    sys.stderr.flush()
+
+    return unittest.TestProgram.runTests(self)
+
+
 class GanetiTestCase(unittest.TestCase):
   """Helper class for unittesting.