<div dir="ltr">Hi all,<div><br></div><div>I have some code base that has platform-specific code, mostly related to how to handle SIGINT and CTRL-C for which I like to use `coverage report --fail-under=100`.  Problem is that some code only runs on one OS, so coverage is always partial in those cases and it&#39;s not so straightforward.</div><div><br></div><div>I&#39;ve used Coveralls for some open source projects and their solution AFAICT seems to be to collect the `.coverage` files in a central location and then combine the coverage files, after which you can run the actual reporting.</div><div><br></div><div>However, I&#39;m not in a position to use Coveralls for this project and integrating a distributed coverage combine is not viable in the short/medium term.</div><div><br></div><div>I&#39;m looking for suggestions on a quick and dirty way to solve this.</div><div><br></div><div>One thing I thought of was using coverage&#39;s `exclude_lines` option [1] with a platform specific token to get this:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>if sys.platform == &#39;win32&#39;:  # pragma: cover win32</div></blockquote><div><br></div><div>I guess this works, but it requires that I have a platform-specific configuration file (e.g. via duplicatation or generation from a template).</div><div><br></div><div>Anybody have any better ideas?</div><div><br>Thanks,</div><div><br></div><div>André</div><div><br></div><div>[1]: <a href="https://coverage.readthedocs.io/en/coverage-4.1/excluding.html#advanced-exclusion">https://coverage.readthedocs.io/en/coverage-4.1/excluding.html#advanced-exclusion</a></div></div>