Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
d030fd34
Commit
d030fd34
authored
May 30, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test__select.py to pass on windows and on py3.2 (the latter is untested)
parent
511d46d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
greentest/test__select.py
greentest/test__select.py
+16
-14
No files found.
greentest/test__select.py
View file @
d030fd34
import
sys
from
gevent
import
select
from
gevent
import
select
,
socket
import
greentest
...
...
@@ -9,26 +9,28 @@ class TestSelect(greentest.GenericWaitTestCase):
select
.
select
([],
[],
[],
timeout
)
class
TestSelectTypes
(
greentest
.
TestCase
)
:
if
sys
.
platform
!=
'win32'
:
if
sys
.
platform
==
'win32'
:
class
TestSelectRead
(
greentest
.
GenericWaitTestCase
)
:
def
test_int
(
self
):
import
msvcrt
self
.
assertRaises
(
select
.
error
,
select
.
select
,
[
msvcrt
.
get_osfhandle
(
1
)],
[],
[],
0.001
)
self
.
assertRaises
(
select
.
error
,
select
.
select
,
[
int
(
msvcrt
.
get_osfhandle
(
1
))],
[],
[],
0.001
)
def
wait
(
self
,
timeout
):
select
.
select
([
sys
.
stdin
.
fileno
()],
[],
[],
timeout
)
def
test_long
(
self
):
import
msvcrt
self
.
assertRaises
(
IOError
,
select
.
select
,
[
long
(
msvcrt
.
get_osfhandle
(
1
))],
[],
[],
0.001
)
else
:
class
TestSelectTypes
(
greentest
.
TestCase
)
:
def
test_int
(
self
):
select
.
select
([
1
],
[],
[],
0.001
)
def
test_int
(
self
):
sock
=
socket
.
socket
()
select
.
select
([
int
(
sock
.
fileno
())],
[],
[],
0.001
)
try
:
long
except
NameError
:
pass
else
:
def
test_long
(
self
):
select
.
select
([
1L
],
[],
[],
0.001
)
sock
=
socket
.
socket
()
select
.
select
([
long
(
sock
.
fileno
())],
[],
[],
0.001
)
def
test_string
(
self
):
self
.
switch_expected
=
False
...
...
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