Skip to content

Commit e0668d0

Browse files
committed
tests: make tests fail if event loop fails
1 parent a10872c commit e0668d0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,10 @@ def is_monkey_patched():
6161
thread_pool_executor_class = ThreadPoolExecutor
6262

6363
if "gevent" in EVENT_LOOP_MANAGER:
64-
try:
65-
import gevent.monkey
66-
gevent.monkey.patch_all()
67-
from cassandra.io.geventreactor import GeventConnection
68-
connection_class = GeventConnection
69-
except ImportError:
70-
connection_class = None
64+
import gevent.monkey
65+
gevent.monkey.patch_all()
66+
from cassandra.io.geventreactor import GeventConnection
67+
connection_class = GeventConnection
7168
elif "eventlet" in EVENT_LOOP_MANAGER:
7269
from eventlet import monkey_patch
7370
monkey_patch()
@@ -90,6 +87,9 @@ def is_monkey_patched():
9087
elif "asyncio" in EVENT_LOOP_MANAGER:
9188
from cassandra.io.asyncioreactor import AsyncioConnection
9289
connection_class = AsyncioConnection
90+
elif "libev" in EVENT_LOOP_MANAGER:
91+
from cassandra.io.libevreactor import LibevConnection
92+
connection_class = LibevConnection
9393
else:
9494
log.debug("Using default event loop (libev)")
9595
try:

0 commit comments

Comments
 (0)