You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
599 B
23 lines
599 B
5 years ago
|
|
||
|
import sys
|
||
|
import gevent.testing as greentest
|
||
|
try:
|
||
|
import selectors # Do this before the patch, just to force it
|
||
|
except ImportError:
|
||
|
pass
|
||
|
from gevent.monkey import patch_all
|
||
|
patch_all()
|
||
|
|
||
|
if sys.platform != 'win32' and sys.version_info[:2] >= (3, 4):
|
||
|
|
||
|
class TestSelectors(greentest.TestCase):
|
||
|
|
||
|
def test_selectors_select_is_patched(self):
|
||
|
# https://github.com/gevent/gevent/issues/835
|
||
|
_select = selectors.SelectSelector._select
|
||
|
self.assertTrue(hasattr(_select, '_gevent_monkey'), dir(_select))
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
greentest.main()
|