Fixed a test for issue #21619 on Windows.

On Windows an OSError with errno=EINVAL is raised.
This commit is contained in:
Serhiy Storchaka 2015-02-28 13:28:19 +02:00
commit 6ab0ec9352
1 changed files with 1 additions and 1 deletions

View File

@ -2512,7 +2512,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)