summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 21:35:18 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-17 21:35:18 (GMT)
commit3438fa496db50ef3cafcfdb3243f2f769bc12ebe (patch)
tree8c480821ca46d7d91d4f3ba8c8343afe389d7208 /Lib/test/test_subprocess.py
parent6eda46de99189812e6982f568bbe941346918964 (diff)
downloadcpython-3438fa496db50ef3cafcfdb3243f2f769bc12ebe.zip
cpython-3438fa496db50ef3cafcfdb3243f2f769bc12ebe.tar.gz
cpython-3438fa496db50ef3cafcfdb3243f2f769bc12ebe.tar.bz2
Get rig of EnvironmentError (#16705)
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index d18784c..c5a513e 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -925,8 +925,7 @@ class ProcessTestCase(BaseTestCase):
# value for that limit, but Windows has 2048, so we loop
# 1024 times (each call leaked two fds).
for i in range(1024):
- # Windows raises IOError. Others raise OSError.
- with self.assertRaises(EnvironmentError) as c:
+ with self.assertRaises(OSError) as c:
subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
@@ -1874,7 +1873,7 @@ class POSIXProcessTestCase(BaseTestCase):
# let some time for the process to exit, and create a new Popen: this
# should trigger the wait() of p
time.sleep(0.2)
- with self.assertRaises(EnvironmentError) as c:
+ with self.assertRaises(OSError) as c:
with subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as proc:
@@ -2155,7 +2154,7 @@ class ContextManagerTests(BaseTestCase):
self.assertEqual(proc.returncode, 1)
def test_invalid_args(self):
- with self.assertRaises(EnvironmentError) as c:
+ with self.assertRaises(OSError) as c:
with subprocess.Popen(['nonexisting_i_hope'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) as proc: