Combine doesn't work with API

Issue #651 closed
Abel Asefa
created an issue

Hi,

After generating the .coverage files for the sub-processes, when I try to combine them by the command line it works but the problem is when I try it with the API. Nothing happens( it is like it combines the files but the combined .coverage file is not generated).

cov = coverage.coverage(data_suffix=True, data_file=".coverage.")
cov.start()
def ab():
    print("ab")

ab()
subprocess.check_output(['python', 'test_mymath.py'])
cov.stop()
cov.save()
datapaths = []
path = glob.glob(os.path.join(os.getcwd(), '.coverage*'))
for path_ in path:
    datapaths.append(path_)
cov.combine(data_paths=datapaths, strict=True)
cov.html_report()

Comments (5)

  1. Log in to comment