]> granicus.if.org Git - python/commitdiff
Merged revisions 84878 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 18 Sep 2010 18:15:33 +0000 (18:15 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 18 Sep 2010 18:15:33 +0000 (18:15 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84878 | antoine.pitrou | 2010-09-18 19:56:02 +0200 (sam., 18 sept. 2010) | 5 lines

  Issue #9894: Do not hardcode ENOENT in test_subprocess.

  (GNU/Hurd is not dead)
........

Lib/test/test_subprocess.py
Misc/NEWS

index bce7b0bf00fdb4a9b03eeb50a01c8104bcff028f..d056ac320d9d7391f82f58ffddaa4107f5e9591e 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_handles_closed_on_exception(self):
index 4c9631fa1df55cb24041191e785613ce72c0df77..558c4f343eba1e768e8e410ba6dc4cdebcb46ead 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -357,6 +357,8 @@ Build
 Tests
 -----
 
+- Issue #9894: Do not hardcode ENOENT in test_subprocess.
+
 - Issue #9323: Make test.regrtest.__file__ absolute, this was not always the
   case when running profile or trace, for example.