當前位置: 首頁>>代碼示例>>Python>>正文


Python logger.TestLoggingHandler類代碼示例

本文整理匯總了Python中test.logger.TestLoggingHandler的典型用法代碼示例。如果您正苦於以下問題:Python TestLoggingHandler類的具體用法?Python TestLoggingHandler怎麽用?Python TestLoggingHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TestLoggingHandler類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_loop_two_control_vars

 def test_loop_two_control_vars(self, iter_type):
     # this should work the same for both iteration types
     tlh = TestLoggingHandler.create_fresh_handler()
     run_section([{'for $i, $j {0} $foo'.format(iter_type): [{'log_i': '$i, $j'}]}],
                 {'foo': {'bar': 'barval', 'spam': 'spamval'}})
     assert ('INFO', 'bar, barval') in tlh.msgs
     assert ('INFO', 'spam, spamval') in tlh.msgs
開發者ID:jkoncick,項目名稱:devassistant,代碼行數:7,代碼來源:test_lang.py

示例2: setup_method

 def setup_method(self, method):
     self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
     self.ya.role = 'crt'
     self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}}
     self.ya._dependencies = [{'rpm': ['foo']}]
     self.ya._dependencies_a = [{'rpm': ['bar']}]
     self.ya._pre_run = [{'log_i': 'pre'}]
     self.ya._run = [{'log_i': 'run'}]
     self.ya._post_run = [{'log_i': 'post'}]
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:TomasTomecek,項目名稱:devassistant,代碼行數:10,代碼來源:test_yaml_assistant.py

示例3: setup_method

    def setup_method(self, method):
        self.ya = yaml_assistant.YamlAssistant('ya', {}, '')
        self.ya.role = 'creator'
        self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}}
        self.tlh = TestLoggingHandler.create_fresh_handler()

        self.ya2 = yaml_assistant.YamlAssistant('ya2', {}, '')
        self.ya2._files = {}
        self.ya2.role = 'creator'
        self.ya2._run = [{'if $ide':
                            [{'if $(test -d /notachance)': [{'log_d': 'ifif'}]},
                             {'else': [{'log_d': 'ifelse'}]}]},
                         {'else': [{'log_d': 'else'}]}]
開發者ID:sYnfo,項目名稱:devassistant,代碼行數:13,代碼來源:test_yaml_assistant.py

示例4: setup_method

 def setup_method(self, method):
     if os.path.exists(self.cf):
         os.unlink(self.cf)
     self.cch = Cache()
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:TomasTomecek,項目名稱:devassistant,代碼行數:5,代碼來源:test_cache.py

示例5: setup_method

 def setup_method(self, method):
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:phracek,項目名稱:devassistant,代碼行數:2,代碼來源:test_lang.py

示例6: setup_method

 def setup_method(self, method):
     self.yl = YamlAssistantLoader
     self.reset_yl_assistants_dirs()
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:sYnfo,項目名稱:devassistant,代碼行數:4,代碼來源:test_yaml_assistant_loader.py

示例7: setup_method

 def setup_method(self, method):
     self.da = actions.DocAction
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:phracek,項目名稱:devassistant,代碼行數:3,代碼來源:test_actions.py

示例8: setup_method

 def setup_method(self, method):
     self.l = LogCommandRunner
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:jumping,項目名稱:devassistant,代碼行數:3,代碼來源:test_command_runners.py

示例9: setup_method

 def setup_method(self, method):
     self.old_command_runners = command_runners.command_runners
     command_runners.command_runners = copy.deepcopy(self.old_command_runners)
     self.tlh = TestLoggingHandler.create_fresh_handler()
開發者ID:Rorosha,項目名稱:devassistant,代碼行數:4,代碼來源:test_command_runners.py

示例10: test_loop_two_control_vars

 def test_loop_two_control_vars(self):
     tlh = TestLoggingHandler.create_fresh_handler()
     run_section([{'for $i, $j in $foo': [{'log_i': '$i, $j'}]}],
                 {'foo': {'bar': 'barval', 'spam': 'spamval'}})
     assert ('INFO', 'bar, barval') in tlh.msgs
     assert ('INFO', 'spam, spamval') in tlh.msgs
開發者ID:mmaslano,項目名稱:devassistant,代碼行數:6,代碼來源:test_lang.py


注:本文中的test.logger.TestLoggingHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。