[Python-3000-checkins] r56245 - python/branches/py3k-struni/Lib/test/test_file.py

guido.van.rossum python-3000-checkins at python.org
Tue Jul 10 22:59:23 CEST 2007


Author: guido.van.rossum
Date: Tue Jul 10 22:59:22 2007
New Revision: 56245

Modified:
   python/branches/py3k-struni/Lib/test/test_file.py
Log:
Fix test_file.py.  It was passing on OSX for the wrong reason
(somehow OSX marks I/O devices as seekable).


Modified: python/branches/py3k-struni/Lib/test/test_file.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_file.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_file.py	Tue Jul 10 22:59:22 2007
@@ -140,12 +140,12 @@
     def testStdin(self):
         # This causes the interpreter to exit on OSF1 v5.1.
         if sys.platform != 'osf1V5':
-            self.assertRaises(ValueError, sys.stdin.seek, -1)
+            self.assertRaises((IOError, ValueError), sys.stdin.seek, -1)
         else:
             print((
                 '  Skipping sys.stdin.seek(-1), it may crash the interpreter.'
                 ' Test manually.'), file=sys.__stdout__)
-        self.assertRaises(ValueError, sys.stdin.truncate)
+        self.assertRaises((IOError, ValueError), sys.stdin.truncate)
 
     def testBadModeArgument(self):
         # verify that we get a sensible error message for bad mode argument


More information about the Python-3000-checkins mailing list