File: coverage.py

package info (click to toggle)
python-certvalidator 0.11.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,488 kB
  • sloc: python: 6,740; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function

import coverage


def run():
    """
    Runs the tests while measuring coverage

    :return:
        A bool - if the tests ran successfully
    """

    cov = coverage.Coverage(include='certvalidator/*.py')
    cov.start()

    from .tests import run as run_tests
    result = run_tests()
    print()

    cov.stop()
    cov.save()

    cov.report(show_missing=False)

    return result