From b61f8941dea05971eb07d58afd66b8e3f4c5582f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 Mar 2015 23:16:24 +0100 Subject: [PATCH] run_checks: Show coverage percentage. --- scripts/run_checks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 0219ae519..943a585f4 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -32,6 +32,7 @@ Module attributes: import sys import subprocess import os +import io import os.path import unittest import logging @@ -165,6 +166,8 @@ def check_unittest(run_coverage): result = unittest.TextTestRunner().run(suite) if run_coverage: cov.stop() + perc = cov.report(file=io.StringIO()) + print("COVERAGE: {}%".format(round(perc))) cov.html_report() print() return result.wasSuccessful()