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
c2c20287
Commit
c2c20287
authored
Dec 06, 2013
by
Fantix King
Committed by
Denis Bilenko
Apr 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed subprocess tests.
parent
77345daa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
greentest/test__subprocess.py
greentest/test__subprocess.py
+6
-6
greentest/test__subprocess_interrupted.py
greentest/test__subprocess_interrupted.py
+3
-3
No files found.
greentest/test__subprocess.py
View file @
c2c20287
...
@@ -64,12 +64,12 @@ class Test(greentest.TestCase):
...
@@ -64,12 +64,12 @@ class Test(greentest.TestCase):
stdin
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stderr
=
subprocess
.
PIPE
)
(
stdout
,
stderr
)
=
p
.
communicate
(
"banana"
)
(
stdout
,
stderr
)
=
p
.
communicate
(
b
"banana"
)
self
.
assertEqual
(
stdout
,
"banana"
)
self
.
assertEqual
(
stdout
,
b
"banana"
)
if
sys
.
executable
.
endswith
(
'-dbg'
):
if
sys
.
executable
.
endswith
(
'-dbg'
):
assert
stderr
.
startswith
(
'pineapple'
)
assert
stderr
.
startswith
(
b
'pineapple'
)
else
:
else
:
self
.
assertEqual
(
stderr
,
"pineapple"
)
self
.
assertEqual
(
stderr
,
b
"pineapple"
)
def
test_universal1
(
self
):
def
test_universal1
(
self
):
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
...
@@ -96,7 +96,7 @@ class Test(greentest.TestCase):
...
@@ -96,7 +96,7 @@ class Test(greentest.TestCase):
else
:
else
:
# Interpreter without universal newline support
# Interpreter without universal newline support
self
.
assertEqual
(
stdout
,
self
.
assertEqual
(
stdout
,
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
b
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
finally
:
finally
:
p
.
stdout
.
close
()
p
.
stdout
.
close
()
...
@@ -123,7 +123,7 @@ class Test(greentest.TestCase):
...
@@ -123,7 +123,7 @@ class Test(greentest.TestCase):
else
:
else
:
# Interpreter without universal newline support
# Interpreter without universal newline support
self
.
assertEqual
(
stdout
,
self
.
assertEqual
(
stdout
,
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
b
"line1
\
n
line2
\
r
line3
\
r
\
n
line4
\
r
\
n
line5
\
n
line6"
)
finally
:
finally
:
p
.
stdout
.
close
()
p
.
stdout
.
close
()
...
...
greentest/test__subprocess_interrupted.py
View file @
c2c20287
...
@@ -12,7 +12,7 @@ else:
...
@@ -12,7 +12,7 @@ else:
import
subprocess
import
subprocess
for
_
in
xrange
(
5
):
for
_
in
xrange
(
5
):
out
,
err
=
subprocess
.
Popen
([
sys
.
executable
,
__file__
,
'runtestcase'
],
stderr
=
subprocess
.
PIPE
).
communicate
()
out
,
err
=
subprocess
.
Popen
([
sys
.
executable
,
__file__
,
'runtestcase'
],
stderr
=
subprocess
.
PIPE
).
communicate
()
if
'refs'
in
err
:
if
b
'refs'
in
err
:
assert
err
.
startswith
(
'bye'
),
repr
(
err
)
assert
err
.
startswith
(
b
'bye'
),
repr
(
err
)
else
:
else
:
assert
err
.
strip
()
==
'bye'
,
repr
(
err
)
assert
err
.
strip
()
==
b
'bye'
,
repr
(
err
)
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