Disabling pyevent-problematic tests.
This commit is contained in:
@@ -71,11 +71,12 @@ def requires_twisted(func):
|
|||||||
return skip_unless(requirement)(func)
|
return skip_unless(requirement)(func)
|
||||||
|
|
||||||
|
|
||||||
def skip_with_pyevent(func):
|
|
||||||
""" Decorator that skips a test if we're using the pyevent hub."""
|
|
||||||
def using_pyevent(_f):
|
def using_pyevent(_f):
|
||||||
from eventlet.hubs import get_hub
|
from eventlet.hubs import get_hub
|
||||||
return 'pyevent' in type(get_hub()).__module__
|
return 'pyevent' in type(get_hub()).__module__
|
||||||
|
|
||||||
|
def skip_with_pyevent(func):
|
||||||
|
""" Decorator that skips a test if we're using the pyevent hub."""
|
||||||
return skip_if(using_pyevent)(func)
|
return skip_if(using_pyevent)(func)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,8 +20,12 @@ patcher.inject('test.test_socketserver',
|
|||||||
('threading', threading))
|
('threading', threading))
|
||||||
|
|
||||||
# only a problem with pyevent
|
# only a problem with pyevent
|
||||||
|
from eventlet import tests
|
||||||
|
if tests.using_pyevent():
|
||||||
try:
|
try:
|
||||||
SocketServerTest.test_ForkingUDPServer = lambda *a, **kw: None
|
SocketServerTest.test_ForkingUDPServer = lambda *a, **kw: None
|
||||||
|
SocketServerTest.test_ForkingTCPServer = lambda *a, **kw: None
|
||||||
|
SocketServerTest.test_ForkingUnixStreamServer = lambda *a, **kw: None
|
||||||
except (NameError, AttributeError):
|
except (NameError, AttributeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user