[Python-checkins] cpython (merge 3.2 -> 3.3): fix test for subprocess (#16644)
andrew.svetlov
python-checkins at python.org
Wed Dec 26 22:36:33 CET 2012
http://hg.python.org/cpython/rev/5d172190c37c
changeset: 81076:5d172190c37c
branch: 3.3
parent: 81071:b6a9f8fd9443
parent: 81075:39be1514c16c
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Wed Dec 26 23:34:54 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(EnvironmentError) 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