Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9b9cd4c8
Commit
9b9cd4c8
authored
Mar 11, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#11963: fix Windows buildbots.
parent
efaad09c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+4
-4
No files found.
Lib/test/test_subprocess.py
View file @
9b9cd4c8
...
...
@@ -319,22 +319,22 @@ class ProcessTestCase(BaseTestCase):
def
test_stdout_filedes_of_stdout
(
self
):
# stdout is set to 1 (#1531862).
# To avoid printing the
'.\n'
on stdout, we do something similar to
# To avoid printing the
text
on stdout, we do something similar to
# test_stdout_none (see above). The parent subprocess calls the child
# subprocess passing stdout=1, and this test uses stdout=PIPE in
# order to capture and check the output of the parent. See #11963.
code
=
(
'import sys, subprocess; '
'rc = subprocess.call([sys.executable, "-c", '
' "import os, sys; sys.exit(os.write(sys.stdout.fileno(), '
'
\
'
.
\
\
\
\
n
\
'
))"], stdout=1); '
'assert rc ==
2
'
)
'
\
'
test with stdout=1
\
'
))"], stdout=1); '
'assert rc ==
18
'
)
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
code
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
self
.
addCleanup
(
p
.
stdout
.
close
)
self
.
addCleanup
(
p
.
stderr
.
close
)
out
,
err
=
p
.
communicate
()
self
.
assertEqual
(
p
.
returncode
,
0
,
err
)
self
.
assertEqual
(
out
,
'.
\
n
'
)
self
.
assertEqual
(
out
.
rstrip
(),
'test with stdout=1
'
)
def
test_cwd
(
self
):
tmpdir
=
tempfile
.
gettempdir
()
...
...
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