Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 679e0f2

Browse files
committed
Issue #9894: Do not hardcode ENOENT in test_subprocess.
(GNU/Hurd is not dead)
1 parent f2dec8d commit 679e0f2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/test_subprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def test_leaking_fds_on_error(self):
530530
subprocess.Popen(['nonexisting_i_hope'],
531531
stdout=subprocess.PIPE,
532532
stderr=subprocess.PIPE)
533-
if c.exception.errno != 2: # ignore "no such file"
533+
if c.exception.errno != errno.ENOENT: # ignore "no such file"
534534
raise c.exception
535535

536536
def test_issue8780(self):

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ Tools/Demos
181181
Tests
182182
-----
183183

184+
- Issue #9894: Do not hardcode ENOENT in test_subprocess.
185+
184186
- Issue #9315: Added tests for the trace module. Patch by Eli Bendersky.
185187

186188
- Issue #9323: Make test.regrtest.__file__ absolute, this was not always the

0 commit comments

Comments
 (0)