| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 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 |