fix test for subprocess (#16644)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index f7a7b11..75eb852 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2023,8 +2023,7 @@
                                   stderr=subprocess.PIPE) as proc:
                 pass
 
-            if c.exception.errno != errno.ENOENT:  # ignore "no such file"
-                raise c.exception
+        self.assertEqual(c.exception.errno, errno.ENOENT)
 
 
 def test_main():