From: Serhiy Storchaka Date: Sat, 28 Feb 2015 11:27:54 +0000 (+0200) Subject: Fixed a test for issue #21619 on Windows. X-Git-Tag: v3.5.0a2~69^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf265fd02a0daacfa026b774a6eb2d7732b544a4;p=thirdparty%2FPython%2Fcpython.git Fixed a test for issue #21619 on Windows. On Windows an OSError with errno=EINVAL is raised. --- diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index caa36cfef561..fc98da501560 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -2531,7 +2531,7 @@ class ContextManagerTests(BaseTestCase): proc.stdout.read() # Make sure subprocess has closed its input proc.stdin.write(b"buffered data") self.assertIsNone(proc.returncode) - self.assertRaises(BrokenPipeError, proc.__exit__, None, None, None) + self.assertRaises(OSError, proc.__exit__, None, None, None) self.assertEqual(0, proc.returncode) self.assertTrue(proc.stdin.closed) self.assertTrue(proc.stdout.closed)