]> granicus.if.org Git - python/commitdiff
Issue #9894: Do not hardcode ENOENT in test_subprocess.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 18 Sep 2010 17:56:02 +0000 (17:56 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 18 Sep 2010 17:56:02 +0000 (17:56 +0000)
(GNU/Hurd is not dead)

Lib/test/test_subprocess.py
Misc/NEWS

index 68ffb33c5f6c9182f50a5c6ad682770b1dde73e3..22b6308b10d36136125b667386904f736412a3eb 100644 (file)
@@ -530,7 +530,7 @@ class ProcessTestCase(BaseTestCase):
                 subprocess.Popen(['nonexisting_i_hope'],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
-            if c.exception.errno != 2:  # ignore "no such file"
+            if c.exception.errno != errno.ENOENT:  # ignore "no such file"
                 raise c.exception
 
     def test_issue8780(self):
index f4f8da833f6fa2879acd9c2350aa48c28249e4e1..c1a5bc8e08f58ef5c09dc7fe3b525fd738e71b3d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -181,6 +181,8 @@ Tools/Demos
 Tests
 -----
 
+- Issue #9894: Do not hardcode ENOENT in test_subprocess.
+
 - Issue #9315: Added tests for the trace module.  Patch by Eli Bendersky.
 
 - Issue #9323: Make test.regrtest.__file__ absolute, this was not always the