You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
701 B
Python
33 lines
701 B
Python
# Tests for the monkey-patched select module.
|
|
from gevent import monkey
|
|
monkey.patch_all()
|
|
|
|
import select
|
|
|
|
import gevent.testing as greentest
|
|
|
|
|
|
class TestSelect(greentest.TestCase):
|
|
|
|
def _make_test(name, ns): # pylint:disable=no-self-argument
|
|
def test(self):
|
|
self.assertIs(getattr(select, name, self), self)
|
|
self.assertFalse(hasattr(select, name))
|
|
test.__name__ = 'test_' + name + '_removed'
|
|
ns[test.__name__] = test
|
|
|
|
for name in (
|
|
'epoll',
|
|
'kqueue',
|
|
'kevent',
|
|
'devpoll',
|
|
):
|
|
_make_test(name, locals())
|
|
|
|
del name
|
|
del _make_test
|
|
|
|
|
|
if __name__ == '__main__':
|
|
greentest.main()
|