当前位置: 首页>>代码示例>>Python>>正文


Python Engine._install_poller方法代码示例

本文整理汇总了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.")
开发者ID:larbing,项目名称:pants,代码行数:37,代码来源:test_engine.py


注:本文中的pants.engine.Engine._install_poller方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。