From: Martin Panter Date: Sat, 10 Sep 2016 10:38:22 +0000 (+0000) Subject: Correct print() calls to print a blank line in various test cases X-Git-Tag: v2.7.13rc1~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad6a99c0111a9291b5b0c09507cd821e9c4937fb;p=python Correct print() calls to print a blank line in various test cases --- diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index bdb71e5e17..8a39cd0ae4 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -63,7 +63,7 @@ class TestCurses(unittest.TestCase): def setUp(self): if verbose: # just to make the test output a little more readable - print() + print('') self.stdscr = curses.initscr() curses.savetty() diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 1b6339d235..11f0d5d614 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -442,7 +442,7 @@ cgi_file4 = """\ import os print("Content-type: text/html") -print() +print("") print(os.environ["%s"]) """ diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index ab92112682..160ccfeb16 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -426,7 +426,7 @@ class ProcessTestCase(BaseTestCase): def test_communicate_pipe_fd_leak(self): fd_directory = '/proc/%d/fd' % os.getpid() num_fds_before_popen = len(os.listdir(fd_directory)) - p = subprocess.Popen([sys.executable, "-c", "print()"], + p = subprocess.Popen([sys.executable, "-c", "print('')"], stdout=subprocess.PIPE) p.communicate() num_fds_after_communicate = len(os.listdir(fd_directory))