This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, brian.curtin, ezio.melotti, michael.foord, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2012-12-08 17:03 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_subprocess_test_invalid_args.patch serhiy.storchaka, 2012-12-08 17:03 Applicable for all versions patch review
test_subprocess_test_invalid_args_3.3.patch serhiy.storchaka, 2012-12-17 18:52 Modernized patch for 3.3+ review
Messages (5)
msg177164 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-08 17:03
Test ContextManagerTests.test_invalid_args() in file Lib/test/test_subprocess.py contains code which has no sense. When Popen() fail then this code will not reachable. When Popen() success then c.exception will not assigned.

Here is a patch with right test.
msg177173 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-08 19:22
The test comes from e02021fbfe22 ("Fix #10554. Added context manager support to Popen objects.").
msg177655 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-17 18:52
For 3.3+ the patch can be modernized.
msg178257 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-26 21:36
New changeset 39be1514c16c by Andrew Svetlov in branch '3.2':
fix test for subprocess (#16644)
http://hg.python.org/cpython/rev/39be1514c16c

New changeset 5d172190c37c by Andrew Svetlov in branch '3.3':
fix test for subprocess (#16644)
http://hg.python.org/cpython/rev/5d172190c37c

New changeset 02d589e2d202 by Andrew Svetlov in branch 'default':
fix test for subprocess (#16644)
http://hg.python.org/cpython/rev/02d589e2d202
msg178258 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-26 21:37
Fixed. 
Thanks, Serhiy.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60848
2012-12-26 21:37:41asvetlovsetstatus: open -> closed
resolution: fixed
messages: + msg178258

stage: patch review -> resolved
2012-12-26 21:36:31python-devsetnosy: + python-dev
messages: + msg178257
2012-12-25 11:11:33asvetlovsetnosy: + asvetlov
2012-12-17 18:52:37serhiy.storchakasetfiles: + test_subprocess_test_invalid_args_3.3.patch

messages: + msg177655
2012-12-15 22:01:23serhiy.storchakalinkissue16648 dependencies
2012-12-08 19:22:39pitrousetnosy: + brian.curtin
messages: + msg177173
2012-12-08 17:03:55serhiy.storchakacreate