Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558ca84 commit 535a5efCopy full SHA for 535a5ef
1 file changed
Lib/test/test_file.py
@@ -140,12 +140,12 @@ def testModeStrings(self):
140
def testStdin(self):
141
# This causes the interpreter to exit on OSF1 v5.1.
142
if sys.platform != 'osf1V5':
143
- self.assertRaises(ValueError, sys.stdin.seek, -1)
+ self.assertRaises((IOError, ValueError), sys.stdin.seek, -1)
144
else:
145
print((
146
' Skipping sys.stdin.seek(-1), it may crash the interpreter.'
147
' Test manually.'), file=sys.__stdout__)
148
- self.assertRaises(ValueError, sys.stdin.truncate)
+ self.assertRaises((IOError, ValueError), sys.stdin.truncate)
149
150
def testBadModeArgument(self):
151
# verify that we get a sensible error message for bad mode argument
0 commit comments