summaryrefslogtreecommitdiff
path: root/Lib/test/test_select.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-16 00:29:59 +0000
committerGuido van Rossum <guido@python.org>1997-04-16 00:29:59 +0000
commitadd9e11151150f9105feb800e433900922fd62ed (patch)
tree4c25bf153e8a453a310655a66b44317a6fbd1867 /Lib/test/test_select.py
parent98ed1dc526a3b06fb5ff56636702a71c1cc33314 (diff)
downloadcpython-add9e11151150f9105feb800e433900922fd62ed.tar.gz
Soft failure for Win32 and Mac platforms. Less output unless verbose.
Diffstat (limited to 'Lib/test/test_select.py')
-rw-r--r--Lib/test/test_select.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index f7f20f327c..32ccfd16fe 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -1,4 +1,5 @@
# Testing select module
+from test_support import verbose
import select
import os
@@ -33,19 +34,27 @@ 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:
- print 'timeout =', tout
+ if verbose:
+ print 'timeout =', tout
rfd, wfd, xfd = select.select([p], [], [], tout)
## print rfd, wfd, xfd
if (rfd, wfd, xfd) == ([], [], []):
continue
if (rfd, wfd, xfd) == ([p], [], []):
line = p.readline()
- print `line`
+ if verbose:
+ print `line`
if not line:
- print 'EOF'
+ if verbose:
+ print 'EOF'
break
continue
print 'Heh?'