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.
This commit is contained in:
parent
3e1ec3aa22
commit
9cdfa4c98c
|
@ -100,12 +100,18 @@ else:
|
||||||
print "writelines accepted sequence of non-string objects"
|
print "writelines accepted sequence of non-string objects"
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
try:
|
# This causes the interpreter to exit on OSF1 v5.1.
|
||||||
sys.stdin.seek(-1)
|
if sys.platform != 'osf1V5':
|
||||||
except IOError:
|
try:
|
||||||
pass
|
sys.stdin.seek(-1)
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
print "should not be able to seek on sys.stdin"
|
||||||
else:
|
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:
|
try:
|
||||||
sys.stdin.truncate()
|
sys.stdin.truncate()
|
||||||
|
|
Loading…
Reference in New Issue