Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
add9e111
Commit
add9e111
authored
Apr 16, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Soft failure for Win32 and Mac platforms. Less output unless verbose.
parent
98ed1dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
Lib/test/test_select.py
Lib/test/test_select.py
+12
-3
No files found.
Lib/test/test_select.py
View file @
add9e111
# Testing select module
# Testing select module
from
test_support
import
verbose
import
select
import
select
import
os
import
os
...
@@ -33,19 +34,27 @@ else:
...
@@ -33,19 +34,27 @@ else:
def
test
():
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'
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'
)
p
=
os
.
popen
(
cmd
,
'r'
)
for
tout
in
(
0
,
1
,
2
,
4
,
8
,
16
)
+
(
None
,)
*
10
:
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
)
rfd
,
wfd
,
xfd
=
select
.
select
([
p
],
[],
[],
tout
)
## print rfd, wfd, xfd
## print rfd, wfd, xfd
if
(
rfd
,
wfd
,
xfd
)
==
([],
[],
[]):
if
(
rfd
,
wfd
,
xfd
)
==
([],
[],
[]):
continue
continue
if
(
rfd
,
wfd
,
xfd
)
==
([
p
],
[],
[]):
if
(
rfd
,
wfd
,
xfd
)
==
([
p
],
[],
[]):
line
=
p
.
readline
()
line
=
p
.
readline
()
print
`line`
if
verbose
:
print
`line`
if
not
line
:
if
not
line
:
print
'EOF'
if
verbose
:
print
'EOF'
break
break
continue
continue
print
'Heh?'
print
'Heh?'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment