fastest.file_handler.run_coverage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A execute_coverage() 0 11 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