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
36284050
Commit
36284050
authored
Dec 14, 2017
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More windows workarounds.
parent
b43f8686
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
4 deletions
+34
-4
src/gevent/libuv/_corecffi_build.py
src/gevent/libuv/_corecffi_build.py
+1
-1
src/greentest/known_failures.py
src/greentest/known_failures.py
+2
-1
src/greentest/patched_tests_setup.py
src/greentest/patched_tests_setup.py
+13
-0
src/greentest/test__core_stat.py
src/greentest/test__core_stat.py
+5
-2
src/greentest/test__ssl.py
src/greentest/test__ssl.py
+13
-0
No files found.
src/gevent/libuv/_corecffi_build.py
View file @
36284050
...
...
@@ -50,7 +50,7 @@ _cdef = _cdef.replace("GEVENT_STRUCT_DONE _;", '...;')
# which we will treat as an 'unsigned long' or 'unsigned long long'
# since it comes through 'fileno()' where it has been cast as an int.
# See class watcher.io
_void_pointer_as_integer
=
'intptr_t'
#'unsigned long' if system_bits() == 32 else 'unsigned long long'
_void_pointer_as_integer
=
'intptr_t'
_cdef
=
_cdef
.
replace
(
"GEVENT_UV_OS_SOCK_T"
,
'int'
if
not
WIN
else
_void_pointer_as_integer
)
...
...
src/greentest/known_failures.py
View file @
36284050
...
...
@@ -68,7 +68,8 @@ if sys.platform == 'win32':
# thread in a timely fashion, leading to 'os.close(4) must
# not succeed' in test_del_close. We have the same thing
# with flushing and closing in test_newlines. Both of
# these are most commonly (only?) observed on Py27/64-bit
# these are most commonly (only?) observed on Py27/64-bit.
# They also appear on 64-bit 3.6 with libuv
'FLAKY test__fileobject.py'
,
]
...
...
src/greentest/patched_tests_setup.py
View file @
36284050
...
...
@@ -207,6 +207,17 @@ if LIBUV:
'test_signal.SiginterruptTest.test_siginterrupt_off'
,
]
if
PY3
:
disabled_tests
+=
[
# This test wants to pass an arbitrary fileno
# to a socket and do things with it. libuv doesn't like this,
# it raises EPERM. It is disabled on windows already.
# It depends on whether we had a fd already open and multiplexed with
'test_socket.GeneralModuleTests.test_unknown_socket_family_repr'
,
]
if
sys
.
platform
.
startswith
(
'linux'
):
disabled_tests
+=
[
# crashes with EPERM, which aborts the epoll loop, even
...
...
@@ -226,6 +237,8 @@ if LIBUV:
'test_selectors.PollSelectorTestCase.test_timeout'
,
]
if
WIN
and
PYPY
:
# From PyPy2-v5.9.0, using its version of tests,
# which do work on darwin (and possibly linux?)
...
...
src/greentest/test__core_stat.py
View file @
36284050
...
...
@@ -17,6 +17,8 @@ EV_USE_INOTIFY = getattr(gevent.core, 'EV_USE_INOTIFY', None)
WIN
=
sys
.
platform
.
startswith
(
'win'
)
LIBUV
=
getattr
(
gevent
.
core
,
'libuv'
,
None
)
def
test
():
try
:
open
(
filename
,
'wb'
,
buffering
=
0
).
close
()
...
...
@@ -51,10 +53,10 @@ def test():
else
:
raise
else
:
if
WIN
:
if
WIN
and
not
LIBUV
:
# The ImportError is only raised for the first time;
# after that, the attribute starts returning None
assert
x
is
None
,
"Only None is supported on Windows"
assert
x
is
None
,
(
"Only None is supported on Windows"
,
x
)
if
none
:
assert
x
is
None
,
x
else
:
...
...
@@ -67,6 +69,7 @@ def test():
if
now
-
start
-
DELAY
<=
0.0
:
# Sigh. This is especially true on PyPy.
assert
WIN
,
(
"Bad timer resolution expected on Windows, test is useless"
,
start
,
now
)
print
(
"On windows, bad timer resolution prevents this test from running"
)
return
reaction
=
now
-
start
-
DELAY
print
(
'Watcher %s reacted after %.4f seconds (write)'
%
(
watcher
,
reaction
))
...
...
src/greentest/test__ssl.py
View file @
36284050
...
...
@@ -9,6 +9,9 @@ import test__socket
import
ssl
import
unittest
from
gevent.hub
import
LoopExit
class
TestSSL
(
test__socket
.
TestTCP
):
certfile
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_server.crt'
)
...
...
@@ -57,6 +60,16 @@ class TestSSL(test__socket.TestTCP):
client
.
close
()
server_sock
[
0
][
0
].
close
()
elif
greentest
.
LIBUV
:
def
test_fullduplex
(
self
):
try
:
super
(
TestSSL
,
self
).
test_fullduplex
()
except
LoopExit
:
# XXX: Unable to duplicate locally
raise
unittest
.
SkipTest
(
"libuv on Windows sometimes raises LoopExit"
)
@
greentest
.
ignores_leakcheck
def
test_empty_send
(
self
):
# Issue 719
...
...
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