[Python-checkins] r43567 - python/trunk/Lib/test/test_file.py (original) (raw)
neal.norwitz python-checkins at python.org
Mon Apr 3 07:27:06 CEST 2006
- Previous message: [Python-checkins] r43566 - python/trunk/setup.py
- Next message: [Python-checkins] r43568 - python/trunk/Lib/test/test_pty.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: neal.norwitz Date: Mon Apr 3 07:27:05 2006 New Revision: 43567
Modified: python/trunk/Lib/test/test_file.py Log: Skip the test for sys.stdin.seek(-1) on OSF/1 (Tru64) since it does Bad Things like cause the interpreter to exit abruptly. If there's a way to fix this, it would be good to really fix it. It could just be the operation of the std C library and we just aren't supposed to do that.
When the test case is skipped, we print a message so the user can check for themselves.
Modified: python/trunk/Lib/test/test_file.py
--- python/trunk/Lib/test/test_file.py (original) +++ python/trunk/Lib/test/test_file.py Mon Apr 3 07:27:05 2006 @@ -100,12 +100,18 @@ print "writelines accepted sequence of non-string objects" f.close()
-try:
- sys.stdin.seek(-1)
-except IOError:
- pass
+# This causes the interpreter to exit on OSF1 v5.1. +if sys.platform != 'osf1V5':
- try:
sys.stdin.seek(-1)
- except IOError:
pass
- else:
print "should not be able to seek on sys.stdin"
else:
- print "should not be able to seek on sys.stdin"
- print >>sys.stdout, (
' Skipping sys.stdin.seek(-1), it may crash the interpreter.'
' Test manually.')
try: sys.stdin.truncate()
- Previous message: [Python-checkins] r43566 - python/trunk/setup.py
- Next message: [Python-checkins] r43568 - python/trunk/Lib/test/test_pty.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]