puncover
puncover copied to clipboard
Fix file path normalization
This PR fixes a bug where base_dir
is ignored and all paths in the generated report are absolute.
In normalize_files_paths
function base_dir
is normalized as os.path.abspath(base_dir)
, but this function returns a string. Then base_dir in path.parents
condition fails to detect that we are inside base directory, because it expects pathlib.Path
not string.
This PR fixes problem by making base_dir
always an instance of pathlib.Path
.