|
|
@ -4,9 +4,7 @@ import os
|
|
|
|
import select
|
|
|
|
import select
|
|
|
|
import socket
|
|
|
|
import socket
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
import time
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
|
|
|
|
import unittest2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import mitogen.core
|
|
|
|
import mitogen.core
|
|
|
|
import mitogen.parent
|
|
|
|
import mitogen.parent
|
|
|
@ -400,7 +398,7 @@ class AllMixin(ReceiveStateMixin,
|
|
|
|
class SelectTest(AllMixin, testlib.TestCase):
|
|
|
|
class SelectTest(AllMixin, testlib.TestCase):
|
|
|
|
klass = mitogen.core.Poller
|
|
|
|
klass = mitogen.core.Poller
|
|
|
|
|
|
|
|
|
|
|
|
SelectTest = unittest2.skipIf(
|
|
|
|
SelectTest = unittest.skipIf(
|
|
|
|
condition=(not SelectTest.klass.SUPPORTED),
|
|
|
|
condition=(not SelectTest.klass.SUPPORTED),
|
|
|
|
reason='select.select() not supported'
|
|
|
|
reason='select.select() not supported'
|
|
|
|
)(SelectTest)
|
|
|
|
)(SelectTest)
|
|
|
@ -409,7 +407,7 @@ SelectTest = unittest2.skipIf(
|
|
|
|
class PollTest(AllMixin, testlib.TestCase):
|
|
|
|
class PollTest(AllMixin, testlib.TestCase):
|
|
|
|
klass = mitogen.parent.PollPoller
|
|
|
|
klass = mitogen.parent.PollPoller
|
|
|
|
|
|
|
|
|
|
|
|
PollTest = unittest2.skipIf(
|
|
|
|
PollTest = unittest.skipIf(
|
|
|
|
condition=(not PollTest.klass.SUPPORTED),
|
|
|
|
condition=(not PollTest.klass.SUPPORTED),
|
|
|
|
reason='select.poll() not supported'
|
|
|
|
reason='select.poll() not supported'
|
|
|
|
)(PollTest)
|
|
|
|
)(PollTest)
|
|
|
@ -418,7 +416,7 @@ PollTest = unittest2.skipIf(
|
|
|
|
class KqueueTest(AllMixin, testlib.TestCase):
|
|
|
|
class KqueueTest(AllMixin, testlib.TestCase):
|
|
|
|
klass = mitogen.parent.KqueuePoller
|
|
|
|
klass = mitogen.parent.KqueuePoller
|
|
|
|
|
|
|
|
|
|
|
|
KqueueTest = unittest2.skipIf(
|
|
|
|
KqueueTest = unittest.skipIf(
|
|
|
|
condition=(not KqueueTest.klass.SUPPORTED),
|
|
|
|
condition=(not KqueueTest.klass.SUPPORTED),
|
|
|
|
reason='select.kqueue() not supported'
|
|
|
|
reason='select.kqueue() not supported'
|
|
|
|
)(KqueueTest)
|
|
|
|
)(KqueueTest)
|
|
|
@ -427,11 +425,7 @@ KqueueTest = unittest2.skipIf(
|
|
|
|
class EpollTest(AllMixin, testlib.TestCase):
|
|
|
|
class EpollTest(AllMixin, testlib.TestCase):
|
|
|
|
klass = mitogen.parent.EpollPoller
|
|
|
|
klass = mitogen.parent.EpollPoller
|
|
|
|
|
|
|
|
|
|
|
|
EpollTest = unittest2.skipIf(
|
|
|
|
EpollTest = unittest.skipIf(
|
|
|
|
condition=(not EpollTest.klass.SUPPORTED),
|
|
|
|
condition=(not EpollTest.klass.SUPPORTED),
|
|
|
|
reason='select.epoll() not supported'
|
|
|
|
reason='select.epoll() not supported'
|
|
|
|
)(EpollTest)
|
|
|
|
)(EpollTest)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
|
|
|
unittest2.main()
|
|
|
|
|
|
|
|