Commit 99411f49 authored by Denis Bilenko's avatar Denis Bilenko

test__subprocess.py: do not reference 'file' (PY3)

parent 824c89f4
......@@ -14,6 +14,9 @@ else:
SETBINARY = ''
python_universal_newlines = hasattr(sys.stdout, 'newlines')
class Test(greentest.TestCase):
def test_exit(self):
......@@ -75,7 +78,7 @@ class Test(greentest.TestCase):
universal_newlines=1)
try:
stdout = p.stdout.read()
if hasattr(file, 'newlines'):
if python_universal_newlines:
# Interpreter with universal newline support
self.assertEqual(stdout,
"line1\nline2\nline3\nline4\nline5\nline6")
......@@ -102,7 +105,7 @@ class Test(greentest.TestCase):
universal_newlines=1)
try:
stdout = p.stdout.read()
if hasattr(file, 'newlines'):
if python_universal_newlines:
# Interpreter with universal newline support
self.assertEqual(stdout,
"line1\nline2\nline3\nline4\nline5\nline6")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment