run_checks: Show coverage percentage.
This commit is contained in:
parent
4fa5872733
commit
b61f8941de
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user