فهرست منبع

Capture stderr messages when running tests

Mike Naberezny 12 سال پیش
والد
کامیت
5775749256
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      supervisor/tests/test_options.py

+ 4 - 0
supervisor/tests/test_options.py

@@ -186,6 +186,8 @@ class ClientOptionsTests(unittest.TestCase):
         self.assertFalse(os.path.exists(fname))
 
         instance = self._makeOne()
+        instance.stderr = StringIO()
+
         class DummyException(Exception):
             def __init__(self, exitcode):
                 self.exitcode = exitcode
@@ -591,6 +593,8 @@ class ServerOptionsTests(unittest.TestCase):
         self.assertFalse(os.path.exists(fname))
 
         instance = self._makeOne()
+        instance.stderr = StringIO()
+
         class DummyException(Exception):
             def __init__(self, exitcode):
                 self.exitcode = exitcode