本文整理汇总了Python中pants.engine.Engine._install_poller方法的典型用法代码示例。如果您正苦于以下问题:Python Engine._install_poller方法的具体用法?Python Engine._install_poller怎么用?Python Engine._install_poller使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.engine.Engine
的用法示例。
在下文中一共展示了Engine._install_poller方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestEngineInstallPoller
# 需要导入模块: from pants.engine import Engine [as 别名]
# 或者: from pants.engine.Engine import _install_poller [as 别名]
class TestEngineInstallPoller(unittest.TestCase):
def setUp(self):
self.engine = Engine()
def test_custom_poller(self):
poller = MagicMock()
self.engine._poller = None
self.engine._channels = {}
self.engine._install_poller(poller)
self.assertTrue(self.engine._poller is poller)
@unittest.skip("Not yet implemented.")
def test_custom_poller_with_existing_channels(self):
self.fail("Not yet implemented.")
@unittest.skip("Not yet implemented.")
def test_custom_poller_with_existing_channels_and_poller(self):
self.fail("Not yet implemented.")
@unittest.skip("Not yet implemented.")
@unittest.skipUnless(hasattr(select, "epoll"), "epoll-specific functionality.")
def test_defaulting_to_epoll(self):
self.fail("Not yet implemented.")
@unittest.skip("Not yet implemented.")
@unittest.skipIf(hasattr(select, "epoll"), "kqueue-specific functionality.")
@unittest.skipUnless(hasattr(select, "kqueue"), "kqueue-specific functionality.")
def test_defaulting_to_kqueue(self):
self.fail("Not yet implemented.")
@unittest.skip("Not yet implemented.")
@unittest.skipIf(hasattr(select, "epoll"), "select-specific functionality.")
@unittest.skipIf(hasattr(select, "kqueue"), "select-specific functionality.")
def test_defaulting_to_select(self):
self.fail("Not yet implemented.")