[Python-checkins] cpython (merge 3.3 -> default): fix test for subprocess (#16644)
andrew.svetlov
python-checkins at python.org
Wed Dec 26 22:36:34 CET 2012
http://hg.python.org/cpython/rev/02d589e2d202
changeset: 81077:02d589e2d202
parent: 81074:70ea05f762a1
parent: 81076:5d172190c37c
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Wed Dec 26 23:36:17 2012 +0200
summary:
fix test for subprocess (#16644)
files:
Lib/test/test_subprocess.py | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2154,15 +2154,12 @@
self.assertEqual(proc.returncode, 1)
def test_invalid_args(self):
- with self.assertRaises(OSError) as c:
+ with self.assertRaises(FileNotFoundError) as c:
with subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as proc:
pass
- if c.exception.errno != errno.ENOENT: # ignore "no such file"
- raise c.exception
-
def test_main():
unit_tests = (ProcessTestCase,
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list