File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,4 +33,5 @@ script:
3333 exit 1
3434 fi
3535 - tox
36- - tox -e patched_loops
36+ - tox -e gevent_loop
37+ - tox -e eventlet_loop
Original file line number Diff line number Diff line change @@ -17,10 +17,11 @@ if($env:ci_type -eq 'unit'){
1717 echo " Running Unit tests"
1818 nosetests - s - v -- with- ignore- docstrings -- with- xunit -- xunit- file= unit_results.xml .\tests\unit
1919
20- $env: MONKEY_PATCH_LOOP = 1
20+ $env: EVENT_LOOP_MANAGER = " gevent "
2121 nosetests - s - v -- with- ignore- docstrings -- with- xunit -- xunit- file= unit_results.xml .\tests\unit\io\test_geventreactor.py
22+ $env: EVENT_LOOP_MANAGER = " eventlet"
2223 nosetests - s - v -- with- ignore- docstrings -- with- xunit -- xunit- file= unit_results.xml .\tests\unit\io\test_eventletreactor.py
23- Remove-Item $env: MONKEY_PATCH_LOOP
24+ $env: EVENT_LOOP_MANAGER = " asyncore "
2425
2526 echo " uploading unit results"
2627 $wc.UploadFile (" https://ci.appveyor.com/api/testresults/junit/$ ( $env: APPVEYOR_JOB_ID ) " , (Resolve-Path .\unit_results.xml))
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ build:
152152 # it takes too much time for the whole matrix to build with cython
153153 if [[ $CYTHON == 'CYTHON' ]]; then
154154 EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_results.xml tests/unit/ || true
155- MONKEY_PATCH_LOOP=$ EVENT_LOOP_MANAGER EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_eventlet_results.xml tests/unit/io/test_eventletreactor.py || true
156- MONKEY_PATCH_LOOP=$ EVENT_LOOP_MANAGER EVENT_LOOP_MANAGER=$EVENT_LOOP_MANAGER VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_gevent_results.xml tests/unit/io/test_geventreactor.py || true
155+ EVENT_LOOP_MANAGER=eventlet VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_eventlet_results.xml tests/unit/io/test_eventletreactor.py || true
156+ EVENT_LOOP_MANAGER=gevent VERIFY_CYTHON=1 nosetests -s -v --logging-format="[%(levelname)s] %(asctime)s %(thread)d: %(message)s" --with-ignore-docstrings --with-xunit --xunit-file=unit_gevent_results.xml tests/unit/io/test_geventreactor.py || true
157157
158158 fi
159159
Original file line number Diff line number Diff line change @@ -89,8 +89,5 @@ def is_monkey_patched():
8989 connection_class = None
9090
9191
92- MONKEY_PATCH_LOOP = os .getenv ('MONKEY_PATCH_LOOP' , False )
93-
9492notwindows = unittest .skipUnless (not "Windows" in platform .system (), "This test is not adequate for windows" )
9593notpypy = unittest .skipUnless (not platform .python_implementation () == 'PyPy' , "This tests is not suitable for pypy" )
96- notmonkeypatch = unittest .skipUnless (MONKEY_PATCH_LOOP , "Skipping this test because monkey patching is required" )
Original file line number Diff line number Diff line change 1919 import unittest # noqa
2020
2121from tests .unit .io .utils import TimerTestMixin
22- from tests import notpypy , MONKEY_PATCH_LOOP , notmonkeypatch
22+ from tests import notpypy , EVENT_LOOP_MANAGER
2323
2424from eventlet import monkey_patch
2525from mock import patch
2929except ImportError :
3030 EventletConnection = None # noqa
3131
32- skip_condition = EventletConnection is None or MONKEY_PATCH_LOOP != "eventlet"
32+ skip_condition = EventletConnection is None or EVENT_LOOP_MANAGER != "eventlet"
3333# There are some issues with some versions of pypy and eventlet
3434@notpypy
3535@unittest .skipIf (skip_condition , "Skipping the eventlet tests because it's not installed" )
36- @notmonkeypatch
3736class EventletTimerTest (TimerTestMixin , unittest .TestCase ):
3837
3938 connection_class = EventletConnection
Original file line number Diff line number Diff line change 1919
2020
2121from tests .unit .io .utils import TimerTestMixin
22- from tests import MONKEY_PATCH_LOOP , notmonkeypatch
22+ from tests import EVENT_LOOP_MANAGER
2323try :
2424 from cassandra .io .geventreactor import GeventConnection
2525 import gevent .monkey
2929from mock import patch
3030
3131
32- skip_condition = GeventConnection is None or MONKEY_PATCH_LOOP != "gevent"
32+ skip_condition = GeventConnection is None or EVENT_LOOP_MANAGER != "gevent"
3333@unittest .skipIf (skip_condition , "Skipping the gevent tests because it's not installed" )
34- @notmonkeypatch
3534class GeventTimerTest (TimerTestMixin , unittest .TestCase ):
3635
3736 connection_class = GeventConnection
Original file line number Diff line number Diff line change @@ -20,14 +20,25 @@ changedir = {envtmpdir}
2020commands = nosetests --verbosity =2 --no-path-adjustment {toxinidir}/tests/unit/
2121
2222
23- [testenv:patched_loops ]
23+ [testenv:gevent_loop ]
2424deps = {[base]deps}
2525 gevent
2626
2727setenv = LIBEV_EMBED =0
2828 CARES_EMBED =0
29- MONKEY_PATCH_LOOP =1
29+ EVENT_LOOP_MANAGER =gevent
3030changedir = {envtmpdir}
3131commands =
32- nosetests --verbosity =2 --no-path-adjustment {toxinidir}/tests/unit/io/test_eventletreactor.py
3332 nosetests --verbosity =2 --no-path-adjustment {toxinidir}/tests/unit/io/test_geventreactor.py
33+
34+
35+ [testenv:eventlet_loop]
36+ deps = {[base]deps}
37+ gevent
38+
39+ setenv = LIBEV_EMBED =0
40+ CARES_EMBED =0
41+ EVENT_LOOP_MANAGER =eventlet
42+ changedir = {envtmpdir}
43+ commands =
44+ nosetests --verbosity =2 --no-path-adjustment {toxinidir}/tests/unit/io/test_eventletreactor.py
You can’t perform that action at this time.
0 commit comments