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
f3765071
Commit
f3765071
authored
Aug 14, 2012
by
Andrew Svetlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test to explicit check the absence regression in subprocess (issue #15592).
Patch by Chris Jerdonek.
parent
f158d860
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+12
-0
No files found.
Lib/test/test_subprocess.py
View file @
f3765071
...
...
@@ -548,6 +548,18 @@ class ProcessTestCase(BaseTestCase):
(
stdout
,
stderr
)
=
p
.
communicate
(
"line1
\
n
line3
\
n
"
)
self
.
assertEqual
(
p
.
returncode
,
0
)
def
test_universal_newlines_communicate_input_none
(
self
):
# Test communicate(input=None) with universal newlines.
#
# We set stdout to PIPE because, as of this writing, a different
# code path is tested when the number of pipes is zero or one.
p
=
subprocess
.
Popen
([
sys
.
executable
,
"-c"
,
"pass"
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
universal_newlines
=
True
)
p
.
communicate
()
self
.
assertEqual
(
p
.
returncode
,
0
)
def
test_no_leaking
(
self
):
# Make sure we leak no resources
if
not
mswindows
:
...
...
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