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


Python tools.tracing_import函数代码示例

本文整理汇总了Python中tools.tracing_import函数的典型用法代码示例。如果您正苦于以下问题:Python tracing_import函数的具体用法?Python tracing_import怎么用?Python tracing_import使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: test_03_branch_rate

    def test_03_branch_rate(self):
        with tracing_import('./code/if_true_else', db=self.db) as module:
            pass
        xml = get_stats_xml(db=self.db, whitelist=[re.compile('.*')], blacklist=[])
        tree = etree.XML(xml)

        for i in tree.xpath('//class'):
            branch_rate = i.xpath("./@branch-rate")[0]
        self.assertXMLBranchRate(branch_rate)
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:9,代码来源:test_xml.py

示例2: test_01_filename

    def test_01_filename(self):
        with tracing_import('./code/if_true_else', db=self.db) as module:
            pass
        xml = get_stats_xml(db=self.db, whitelist=[re.compile('.*')], blacklist=[])
        tree = etree.XML(xml)

        for i in tree.xpath('//class'):
            filename = i.xpath("./@filename")[0]
        self.assertResultFileName(filename)
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:9,代码来源:test_xml.py

示例3: test_15_if_false_while_some

 def test_15_if_false_while_some(self):
     with tracing_import('if_false_while_some', db=self.db) as module:
         pass
     self.assertResultBranchRate(Rate(0, 2))     
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例4: test_12_if_true_for_some_ifelse

 def test_12_if_true_for_some_ifelse(self):
     with tracing_import('if_true_for_some_ifelse', db=self.db) as module:
         pass
     self.assertResultBranchRate(Rate(2, 3))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例5: test_45_true_false__function_value_if_value_else

 def test_45_true_false__function_value_if_value_else(self):
     with tracing_import('function_value_if_value_else', db=self.db) as module: 
         module.function(True); module.function(False)
     self.assertResultBranchRate(Rate(2, 2))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例6: test_41_for_empty_if_true_if_false_not_nested

 def test_41_for_empty_if_true_if_false_not_nested(self):
     with tracing_import('for_empty_if_true_if_false_not_nested', db=self.db) as module:
         pass
     self.assertResultBranchRate(Rate(1, 3))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例7: test_02_empty_file

 def test_02_empty_file(self):
     with tracing_import('empty_file', db=self.db) as module:
         pass
     self.assertResultBranchRate(None)        
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例8: test_33_for_some_for_some

 def test_33_for_some_for_some(self):
     with tracing_import('for_some_for_some', db=self.db) as module:
         pass
     self.assertResultBranchRate(Rate(2, 2))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_branch_rate.py

示例9: test_14_if_false_while_some

 def test_14_if_false_while_some(self):
     with tracing_import('if_false_while_some', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(1, 4))     
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例10: test_13_if_true_for_some_ifelse_for_some

 def test_13_if_true_for_some_ifelse_for_some(self):
     with tracing_import('if_true_for_some_ifelse_for_some', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(3, 5))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例11: test_10_if_true_if_true_else

 def test_10_if_true_if_true_else(self):
     with tracing_import('if_true_if_true_else', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(3, 4))  
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例12: test_08_if_true_if_false

 def test_08_if_true_if_false(self):
     with tracing_import('if_true_if_false', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(2, 5))        
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例13: test_43_false_fucntion_value_if_value_else

 def test_43_false_fucntion_value_if_value_else(self):
     with tracing_import('function_value_if_value_else', db=self.db) as module: 
         module.function(False)
     self.assertResultLineRate(Rate(3, 4))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例14: test_40_for_empty_if_true_if_false_not_nested

 def test_40_for_empty_if_true_if_false_not_nested(self):
     with tracing_import('for_empty_if_true_if_false_not_nested', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(4, 6))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py

示例15: test_39_for_empty_break_else

 def test_39_for_empty_break_else(self):
     with tracing_import('for_empty_break_else', db=self.db) as module:
         pass
     self.assertResultLineRate(Rate(2, 3))
开发者ID:RedHatQE,项目名称:python-moncov,代码行数:4,代码来源:test_line_rate.py


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