Commit add9e111 authored by Guido van Rossum's avatar Guido van Rossum

Soft failure for Win32 and Mac platforms. Less output unless verbose.

parent 98ed1dc5
# Testing select module
from test_support import verbose
import select
import os
......@@ -33,9 +34,15 @@ else:
def test():
import sys
if sys.platform in ('win', 'mac'):
if verbose:
print "Can't test select easily"
return
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
p = os.popen(cmd, 'r')
for tout in (0, 1, 2, 4, 8, 16) + (None,)*10:
if verbose:
print 'timeout =', tout
rfd, wfd, xfd = select.select([p], [], [], tout)
## print rfd, wfd, xfd
......@@ -43,8 +50,10 @@ def test():
continue
if (rfd, wfd, xfd) == ([p], [], []):
line = p.readline()
if verbose:
print `line`
if not line:
if verbose:
print 'EOF'
break
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment