# 需要导入模块: from coverage import coverage [as 别名]

# 或者: from coverage.coverage import summary [as 别名]

def _harvest_data(self):

"""Get the collected data and reset the collector.

Also warn about various problems collecting data.

"""

if not self._measured:

return

self.data.add_line_data(self.collector.get_line_data())

self.data.add_arc_data(self.collector.get_arc_data())

self.collector.reset()

# If there are still entries in the source_pkgs list, then we never

# encountered those packages.

if self._warn_unimported_source:

for pkg in self.source_pkgs:

self._warn("Module %s was never imported." % pkg)

# Find out if we got any data.

summary = self.data.summary()

if not summary and self._warn_no_data:

self._warn("No data was collected.")

# Find files that were never executed at all.

for src in self.source:

for py_file in find_python_files(src):

py_file = self.file_locator.canonical_filename(py_file)

if self.omit_match and self.omit_match.match(py_file):

# Turns out this file was omitted, so don't pull it back

# in as unexecuted.

continue

self.data.touch_file(py_file)

self._measured = False

# Backward compatibility with version 1.

python summary结果提取_Python coverage.summary方法代码示例相关推荐

  1. python中config命令_Python config.config方法代码示例

    本文整理汇总了Python中config.config方法的典型用法代码示例.如果您正苦于以下问题:Python config.config方法的具体用法?Python config.config怎么 ...

  2. python连接redis哨兵_Python redis.sentinel方法代码示例

    本文整理汇总了Python中redis.sentinel方法的典型用法代码示例.如果您正苦于以下问题:Python redis.sentinel方法的具体用法?Python redis.sentine ...

  3. python程序异常实例_Python werkzeug.exceptions方法代码示例

    本文整理汇总了Python中werkzeug.exceptions方法的典型用法代码示例.如果您正苦于以下问题:Python werkzeug.exceptions方法的具体用法?Python wer ...

  4. python中geometry用法_Python geometry.Point方法代码示例

    本文整理汇总了Python中shapely.geometry.Point方法的典型用法代码示例.如果您正苦于以下问题:Python geometry.Point方法的具体用法?Python geome ...

  5. python re 简单实例_Python re.search方法代码示例

    本文整理汇总了Python中re.search方法的典型用法代码示例.如果您正苦于以下问题:Python re.search方法的具体用法?Python re.search怎么用?Python re. ...

  6. python中fact用法_Python covariance.EllipticEnvelope方法代码示例

    本文整理汇总了Python中sklearn.covariance.EllipticEnvelope方法的典型用法代码示例.如果您正苦于以下问题:Python covariance.EllipticEn ...

  7. python 求 gamma 分布_Python stats.gamma方法代码示例

    本文整理汇总了Python中scipy.stats.gamma方法的典型用法代码示例.如果您正苦于以下问题:Python stats.gamma方法的具体用法?Python stats.gamma怎么 ...

  8. python messagebox弹窗退出_Python messagebox.showinfo方法代码示例

    本文整理汇总了Python中tkinter.messagebox.showinfo方法的典型用法代码示例.如果您正苦于以下问题:Python messagebox.showinfo方法的具体用法?Py ...

  9. python关于messagebox题目_Python messagebox.askokcancel方法代码示例

    本文整理汇总了Python中tkinter.messagebox.askokcancel方法的典型用法代码示例.如果您正苦于以下问题:Python messagebox.askokcancel方法的具 ...

  10. python安装mlab库_Python mlab.normpdf方法代码示例

    本文整理汇总了Python中matplotlib.mlab.normpdf方法的典型用法代码示例.如果您正苦于以下问题:Python mlab.normpdf方法的具体用法?Python mlab.n ...

最新文章

  1. 一文搞懂K近邻算法(KNN),附带多个实现案例
  2. 请你讲一下路由器和交换机的区别
  3. sudo命令_如何在非 sudo 用户下运行 docker 命令?
  4. HDOJ 4876 ZCC loves cards
  5. LeetCode 664. 奇怪的打印机(区间DP)
  6. lfu算法实现java_LFU五种实现方式,从简单到复杂
  7. 计算机专业需要学好的数学知识,学好数学对计算机专业重要吗?
  8. 有凤来仪的意思是什么?成语有凤来仪比喻什么?
  9. 微型计算机在机械设计中的应用,浅谈计算机技术在机械设计制造及自动化中的应用.docx...
  10. 软件设计原则(四) 里氏替换原则
  11. hfss螺旋平面_微波射频网HFSS平面螺旋天线设计
  12. 分享80个贺卡图片PHP源码,总有一款适合你
  13. Guava的两种本地缓存策略
  14. Bitbucket安装配置
  15. Teams登录报错最全的解决方法ERROR CAA20002 caa70004
  16. maven通过mvn命令添加oracle依赖
  17. web使用openoffice实现在线预览office文档
  18. python画趋势图_python 绘制走势图
  19. 行人违章是否该罚月薪1 3
  20. 当液晶显示屏发生漏液时该如何亡羊补牢?

热门文章

  1. CM: How is attachment version implemented
  2. 如何通过简单的配置,实现SAP Spartacus的guest checkout需求
  3. why always WebContent is added as prefix of url when repository request served
  4. SAP CRM Survey调查问卷的模型设计原理解析
  5. oracle util_mail,在oracle 10g中发送电子邮件
  6. 打印菱形(Java)
  7. c语言实参和形参占用存储单元_必须知道的C语言知识细节:函数形参和实参的区别...
  8. MySQL跨机房集群方案_Mysql跨机房同步方案
  9. php的一些不安全函数,php中可能会产生安全问题一些函数
  10. android和windows技术,《技术》android运行windows的优化与试调整