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
e6294197
Commit
e6294197
authored
Oct 20, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test__execmodules on windows
parent
23c5ee4a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
19 deletions
+42
-19
gevent/_fileobject3.py
gevent/_fileobject3.py
+7
-3
gevent/_socket2.py
gevent/_socket2.py
+2
-2
greentest/greentest.py
greentest/greentest.py
+23
-0
greentest/test__all__.py
greentest/test__all__.py
+2
-7
greentest/test__execmodules.py
greentest/test__execmodules.py
+8
-6
known_failures.py
known_failures.py
+0
-1
No files found.
gevent/_fileobject3.py
View file @
e6294197
from
gevent._fileobjectposix
import
FileObjectPosix
__all__
=
[
'FileObjectPosix'
,
]
try
:
from
gevent._fileobjectposix
import
FileObjectPosix
__all__
=
[
'FileObjectPosix'
,
]
except
ImportError
:
import
sys
assert
sys
.
platform
.
startswith
(
'win'
),
"Should be able to import except on Windows"
__all__
=
[]
gevent/_socket2.py
View file @
e6294197
...
...
@@ -475,7 +475,7 @@ if hasattr(_socket, 'socketpair'):
one
.
_drop
()
two
.
_drop
()
return
result
el
se
:
el
if
'socketpair'
in
__implements__
:
__implements__
.
remove
(
'socketpair'
)
if
hasattr
(
_socket
,
'fromfd'
):
...
...
@@ -487,7 +487,7 @@ if hasattr(_socket, 'fromfd'):
s
.
_drop
()
return
result
el
se
:
el
if
'fromfd'
in
__implements__
:
__implements__
.
remove
(
'fromfd'
)
if
hasattr
(
__socket__
,
'ssl'
):
...
...
greentest/greentest.py
View file @
e6294197
...
...
@@ -48,6 +48,29 @@ else:
gettotalrefcount
=
getattr
(
sys
,
'gettotalrefcount'
,
None
)
OPTIONAL_MODULES
=
[
'resolver_ares'
]
# Generally, ignore the portions that are only implemented
# on particular platforms; they generally contain partial
# implementations completed in different modules.
PLATFORM_SPECIFIC_SUFFIXES
=
[
'2'
,
'279'
,
'3'
]
if
sys
.
platform
.
startswith
(
'win'
):
PLATFORM_SPECIFIC_SUFFIXES
.
append
(
'posix'
)
NON_APPLICABLE_SUFFIXES
=
[]
if
sys
.
version_info
[
0
]
==
3
:
# Python 3
NON_APPLICABLE_SUFFIXES
.
extend
((
'2'
,
'279'
))
if
sys
.
version_info
[
0
]
==
2
:
# Any python 2
NON_APPLICABLE_SUFFIXES
.
append
(
'3'
)
if
(
sys
.
version_info
[
1
]
<
7
or
(
sys
.
version_info
[
1
]
==
7
and
sys
.
version_info
[
2
]
<
9
)):
# Python 2, < 2.7.9
NON_APPLICABLE_SUFFIXES
.
append
(
'279'
)
if
sys
.
platform
.
startswith
(
'win'
):
NON_APPLICABLE_SUFFIXES
.
append
(
"posix"
)
# This is intimately tied to FileObjectPosix
NON_APPLICABLE_SUFFIXES
.
append
(
"fileobject2"
)
class
ExpectedException
(
Exception
):
"""An exception whose traceback should be ignored"""
...
...
greentest/test__all__.py
View file @
e6294197
...
...
@@ -5,6 +5,7 @@ import sys
import
unittest
import
types
from
greentest
import
walk_modules
from
greentest
import
PLATFORM_SPECIFIC_SUFFIXES
MAPPING
=
{
...
...
@@ -162,13 +163,7 @@ are missing from %r:
raise
AssertionError
(
msg
)
def
_test
(
self
,
modname
):
# Generally, ignore the portions that are only implemented
# on particular platforms; they generally contain partial
# implementations completed in different modules.
ignored_suffixes
=
[
'2'
,
'279'
,
'3'
]
if
sys
.
platform
.
startswith
(
'win'
):
ignored_suffixes
.
append
(
'posix'
)
for
x
in
ignored_suffixes
:
for
x
in
PLATFORM_SPECIFIC_SUFFIXES
:
if
modname
.
endswith
(
x
):
return
...
...
greentest/test__execmodules.py
View file @
e6294197
import
sys
from
gevent.hub
import
PYGTE279
from
greentest
import
walk_modules
,
BaseTestCase
,
main
from
greentest
import
walk_modules
,
BaseTestCase
,
main
,
NON_APPLICABLE_SUFFIXES
import
six
...
...
@@ -22,12 +22,14 @@ def make_exec_test(path, module):
for
path
,
module
in
walk_modules
():
if
sys
.
version_info
[
0
]
==
3
and
path
.
endswith
(
'2.py'
):
continue
if
sys
.
version_info
[
0
]
==
2
and
path
.
endswith
(
'3.py'
):
continue
if
not
PYGTE279
and
path
.
endswith
(
'279.py'
):
ignored
=
False
for
x
in
NON_APPLICABLE_SUFFIXES
:
if
module
.
endswith
(
x
):
ignored
=
True
break
if
ignored
:
continue
make_exec_test
(
path
,
module
)
...
...
known_failures.py
View file @
e6294197
...
...
@@ -55,7 +55,6 @@ if sys.platform == 'win32':
# fork watchers don't get called in multithreaded programs on windows
# No idea why.
'test__core_fork.py'
,
'test__execmodules.py'
,
'FLAKY test__greenletset.py'
,
# The various timeout tests are flaky for unknown reasons
# on appveyor
...
...
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