Commit 3a3db2a7 authored by Jason Madden's avatar Jason Madden

All the tests involving subprocess on Win/Py3 are passing, except universal newlines.

parent b2987ba4
......@@ -430,7 +430,7 @@ class Popen(object):
# Under Python 3, if we left on the 'b' we'd get different results
# depending on whether we used FileObjectPosix or FileObjectThread
self.stdin = FileObject(p2cwrite, 'wb', bufsize)
self.stdin._tranlate = True
self.stdin._translate = True
self.stdin.io = io.TextIOWrapper(self.stdin.io, write_through=True,
line_buffering=(bufsize == 1))
else:
......@@ -440,9 +440,11 @@ class Popen(object):
if PY3:
# FileObjectThread doesn't support the 'U' qualifier
# with a bufsize of 0
# XXX: Universal newlines seem broken on windows?
self.stdout = FileObject(c2pread, 'rb', bufsize)
self.stdout.io = io.TextIOWrapper(self.stdout.io)
self.stdout._tranlate = True
self.stdout.io.mode = 'r'
self.stdout._translate = True
else:
self.stdout = FileObject(c2pread, 'rU', bufsize)
else:
......@@ -452,7 +454,7 @@ class Popen(object):
if PY3:
self.stderr = FileObject(errread, 'rb', bufsize)
self.stderr.io = io.TextIOWrapper(self.stderr.io)
self.stderr._tranlate = True
self.stderr._translate = True
else:
self.stderr = FileObject(errread, 'rU', bufsize)
else:
......
......@@ -91,11 +91,6 @@ class Test(greentest.TestCase):
bufsize=1)
try:
stdout = p.stdout.read()
if PY3 and isinstance(stdout, bytes):
# OS X gives us binary back from stdout.read, but linux (travis ci)
# gives us text...text is correct because we're in universal newline
# mode
stdout = stdout.decode('ascii')
if python_universal_newlines:
# Interpreter with universal newline support
self.assertEqual(stdout,
......
......@@ -90,26 +90,11 @@ if sys.platform == 'win32':
FAILING_TESTS.append('test_ftplib.py')
if PY3:
# Lets see how close we get
#FAILING_TESTS += [
# We don't have an implementation of subprocess
# on PY3/Windows...
#'test__subprocess_poll.py',
# Therefore we don't monkey-patch it by default because
# it breaks subprocess completely
#'test_subprocess.py',
#]
# XXX need investigating
FAILING_TESTS += [
'test__example_portforwarder.py',
'test__socket_ex.py',
'test__examples.py',
'test__issue600.py',
'test__subprocess.py',
'test_threading_2.py',
'test__subprocess.py', # universal newlines are borked?
'FLAKY test__api_timeout.py',
'test__example_udp_client.py'
]
......
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