summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-04-03 05:27:05 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-04-03 05:27:05 (GMT)
commit9cdfa4c98cd093d37450e1e6b025fc3aa8d50fe1 (patch)
treef13af65879be5b21e5f287183276634795d170dc /Lib
parent3e1ec3aa22ea152b8485c1d8cd986b6eff68ece8 (diff)
downloadcpython-9cdfa4c98cd093d37450e1e6b025fc3aa8d50fe1.zip
cpython-9cdfa4c98cd093d37450e1e6b025fc3aa8d50fe1.tar.gz
cpython-9cdfa4c98cd093d37450e1e6b025fc3aa8d50fe1.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_file.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index efb06f4..a9f5e46 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -100,12 +100,18 @@ else:
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()