From: Mukund Sivaraman Date: Thu, 14 Jun 2012 07:28:42 +0000 (+0530) Subject: [1828] Don't redirect stdout in some tests X-Git-Tag: trac2351_base~226^2~42^2~1^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbeee5330ca6f6619b371b11ce8e54b705abc4ed;p=thirdparty%2Fkea.git [1828] Don't redirect stdout in some tests --- diff --git a/src/bin/xfrout/tests/xfrout_test.py.in b/src/bin/xfrout/tests/xfrout_test.py.in index 3c5066d9a8..6f38b75d4a 100644 --- a/src/bin/xfrout/tests/xfrout_test.py.in +++ b/src/bin/xfrout/tests/xfrout_test.py.in @@ -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