[Python-checkins] cpython (2.7): Correct print() calls to print a blank line in various test cases

martin.panter python-checkins at python.org
Sat Sep 10 06:39:48 EDT 2016


https://hg.python.org/cpython/rev/13f3babb2547
changeset: 103567:13f3babb2547
branch: 2.7
parent: 103558:74667320778e
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Sep 10 10:38:22 2016 +0000
summary:
 Correct print() calls to print a blank line in various test cases
files:
 Lib/test/test_curses.py | 2 +-
 Lib/test/test_httpservers.py | 2 +-
 Lib/test/test_subprocess.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -63,7 +63,7 @@
 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
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -442,7 +442,7 @@
 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
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -426,7 +426,7 @@
 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))
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /