Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
7e49528b
Commit
7e49528b
authored
Jun 20, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another platform difference.
parent
94e6e809
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
greentest/test__subprocess.py
greentest/test__subprocess.py
+15
-4
No files found.
greentest/test__subprocess.py
View file @
7e49528b
...
...
@@ -10,6 +10,7 @@ import gc
PYPY
=
hasattr
(
sys
,
'pypy_version_info'
)
PY3
=
sys
.
version_info
[
0
]
>=
3
if
subprocess
.
mswindows
:
...
...
@@ -90,14 +91,19 @@ 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
,
b
"line1
\
n
line2
\
n
line3
\
n
line4
\
n
line5
\
n
line6"
)
"line1
\
n
line2
\
n
line3
\
n
line4
\
n
line5
\
n
line6"
)
else
:
# Interpreter without universal newline support
self
.
assertEqual
(
stdout
,
b
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
finally
:
p
.
stdout
.
close
()
...
...
@@ -118,14 +124,19 @@ 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
,
b
"line1
\
n
line2
\
n
line3
\
n
line4
\
n
line5
\
n
line6"
)
"line1
\
n
line2
\
n
line3
\
n
line4
\
n
line5
\
n
line6"
)
else
:
# Interpreter without universal newline support
self
.
assertEqual
(
stdout
,
b
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
finally
:
p
.
stdout
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment