]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1828] Don't redirect stdout in some tests
authorMukund Sivaraman <muks@isc.org>
Thu, 14 Jun 2012 07:28:42 +0000 (12:58 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 14 Jun 2012 07:28:42 +0000 (12:58 +0530)
src/bin/xfrout/tests/xfrout_test.py.in

index 3c5066d9a8968c91ff1beacbb2b737368baab8ae..6f38b75d4a920b6e71c63add575c34f1b6c281a2 100644 (file)
@@ -1377,20 +1377,13 @@ class TestUnixSockServer(unittest.TestCase):
         self._remove_file(sock_file)
         self.assertFalse(self.unix._sock_file_in_use(sock_file))
         self._start_unix_sock_server(sock_file)
-
-        old_stdout = sys.stdout
-        with open(os.devnull, 'w') as f:
-            sys.stdout = f
-            self.assertTrue(self.unix._sock_file_in_use(sock_file))
-        sys.stdout = old_stdout
+        self.assertTrue(self.unix._sock_file_in_use(sock_file))
 
     def test_remove_unused_sock_file_in_use(self):
         sock_file = 'temp.sock.file'
         self._remove_file(sock_file)
         self.assertFalse(self.unix._sock_file_in_use(sock_file))
         self._start_unix_sock_server(sock_file)
-        old_stdout = sys.stdout
-        sys.stdout = open(os.devnull, 'w')
         try:
             self.unix._remove_unused_sock_file(sock_file)
         except SystemExit:
@@ -1398,8 +1391,6 @@ class TestUnixSockServer(unittest.TestCase):
         else:
             # This should never happen
             self.assertTrue(False)
-        sys.stdout.close()
-        sys.stdout = old_stdout
 
     def test_remove_unused_sock_file_dir(self):
         import tempfile