You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported byGabriel Duman (Bitbucket: gabber7, GitHub: gabber7)
i'm not sure if these two feature are meant to be combined.
this is a test script to reproduce
#!python
import multiprocessing
import sys
def func(value):
if value % 2 == 0:
print value, 'is even'
else:
print value, 'is odd'
if __name__ == "__main__": # pragma: no cover
values = range(2)
pool = multiprocessing.Pool(processes=2)
pool.map(func, values)
pool.close()
pool.join()
and here is the result
#!bash
> coverage --version
Coverage.py, version 4.1 with C extension
Documentation at https://coverage.readthedocs.io
> coverage run --branch --concurrency=multiprocessing test.py
0 is even
1 is odd
> coverage combine
Can't combine line data with arc data
> coverage report
Name Stmts Miss Branch BrPart Cover
-------------------------------------------
test.py 6 3 2 0 38%
>
when i remove the argument --branch the combine command works. sometimes i get a warning that no data was collected. i cannot reproduce this at the moment.
#!bash
> coverage run --concurrency=multiprocessing test.py
0 is even
1 is odd
Coverage.py warning: No data was collected.
> coverage combine
> coverage report
Name Stmts Miss Cover
-----------------------------
test.py 6 0 100%
>
I'm going to leave this as a documented limitation of the command-line flags. Once programs get complicated enough to use multiprocessing, options should go in a configuration file.
Originally reported by Gabriel Duman (Bitbucket: gabber7, GitHub: gabber7)
i'm not sure if these two feature are meant to be combined.
this is a test script to reproduce
and here is the result
when i remove the argument --branch the combine command works. sometimes i get a warning that no data was collected. i cannot reproduce this at the moment.
The text was updated successfully, but these errors were encountered: