mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
SF #1479181: split open() and file() from being aliases for each other.
This commit is contained in:
parent
4bbf66e852
commit
c4edb0ec81
5 changed files with 23 additions and 17 deletions
|
@ -347,7 +347,7 @@ class ProcessTestCase(unittest.TestCase):
|
|||
stdout=subprocess.PIPE,
|
||||
universal_newlines=1)
|
||||
stdout = p.stdout.read()
|
||||
if hasattr(open, 'newlines'):
|
||||
if hasattr(p.stdout, 'newlines'):
|
||||
# Interpreter with universal newline support
|
||||
self.assertEqual(stdout,
|
||||
"line1\nline2\nline3\nline4\nline5\nline6")
|
||||
|
@ -374,7 +374,7 @@ class ProcessTestCase(unittest.TestCase):
|
|||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
universal_newlines=1)
|
||||
(stdout, stderr) = p.communicate()
|
||||
if hasattr(open, 'newlines'):
|
||||
if hasattr(stdout, 'newlines'):
|
||||
# Interpreter with universal newline support
|
||||
self.assertEqual(stdout,
|
||||
"line1\nline2\nline3\nline4\nline5\nline6")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue