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


Python DummyOptions.first方法代码示例

本文整理汇总了Python中supervisor.tests.base.DummyOptions.first方法的典型用法代码示例。如果您正苦于以下问题:Python DummyOptions.first方法的具体用法?Python DummyOptions.first怎么用?Python DummyOptions.first使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在supervisor.tests.base.DummyOptions的用法示例。


在下文中一共展示了DummyOptions.first方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_main_first

# 需要导入模块: from supervisor.tests.base import DummyOptions [as 别名]
# 或者: from supervisor.tests.base.DummyOptions import first [as 别名]
 def test_main_first(self):
     options = DummyOptions()
     pconfig = DummyPConfig(options, 'foo', 'foo', '/bin/foo')
     gconfigs = [DummyPGroupConfig(options,'foo', pconfigs=[pconfig])]
     options.process_group_configs = gconfigs
     options.test = True
     options.first = True
     supervisord = self._makeOne(options)
     supervisord.main()
     self.assertEqual(options.environment_processed, True)
     self.assertEqual(options.fds_cleaned_up, False)
     self.assertEqual(options.rlimits_set, True)
     self.assertEqual(options.parse_criticals, ['setuid_called'])
     self.assertEqual(options.parse_warnings, [])
     self.assertEqual(options.parse_infos, ['rlimits_set'])
     self.assertEqual(options.autochildlogdir_cleared, True)
     self.assertEqual(len(supervisord.process_groups), 1)
     self.assertEqual(supervisord.process_groups['foo'].config.options,
                      options)
     self.assertEqual(options.environment_processed, True)
     self.assertEqual(options.httpservers_opened, True)
     self.assertEqual(options.signals_set, True)
     self.assertEqual(options.daemonized, True)
     self.assertEqual(options.pidfile_written, True)
     self.assertEqual(options.cleaned_up, True)
开发者ID:shendadi,项目名称:flaskauth,代码行数:27,代码来源:test_supervisord.py

示例2: test_main_notfirst

# 需要导入模块: from supervisor.tests.base import DummyOptions [as 别名]
# 或者: from supervisor.tests.base.DummyOptions import first [as 别名]
 def test_main_notfirst(self):
     options = DummyOptions()
     pconfig = DummyPConfig(options, 'foo', 'foo', '/bin/foo')
     gconfigs = [DummyPGroupConfig(options,'foo', pconfigs=[pconfig])]
     options.process_group_configs = gconfigs
     options.test = True
     options.first = False
     supervisord = self._makeOne(options)
     supervisord.main()
     self.assertEqual(options.environment_processed, True)
     self.assertEqual(options.fds_cleaned_up, True)
     self.assertFalse(hasattr(options, 'rlimits_set'))
     self.assertEqual(options.make_logger_messages,
                      (['setuid_called'], [], []))
     self.assertEqual(options.autochildlogdir_cleared, True)
     self.assertEqual(len(supervisord.process_groups), 1)
     self.assertEqual(supervisord.process_groups['foo'].config.options,
                      options)
     self.assertEqual(options.environment_processed, True)
     self.assertEqual(options.httpservers_opened, True)
     self.assertEqual(options.signals_set, True)
     self.assertEqual(options.daemonized, False)
     self.assertEqual(options.pidfile_written, True)
     self.assertEqual(options.cleaned_up, True)
开发者ID:GulsahKose,项目名称:supervisor,代码行数:26,代码来源:test_supervisord.py


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