execute_coverage()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
import subprocess
2
import os
3
import pathlib
4
from fastest.logger.logger import logger
5
6
7
def execute_coverage(report_path):
8
    """
9
    Function with a side-effect to create
10
    coverage report and prints to stdout
11
    :param report_path: str
12
    :return: None
13
    """
14
    subprocess.call(['coverage', 'report'])
15
    subprocess.call(['coverage', 'html'])
16
    coverage_path = os.path.join(report_path, 'htmlcov', 'index.html')
17
    logger.info(pathlib.Path(coverage_path).as_uri())
18