<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>When I hit this, I just ran the tests on the various platforms
      and used "coverage conbine" to get them into one place before
      making assertions.</p>
    <p>cheers,</p>
    <p>Chris<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 27/07/2016 18:56, André Caron wrote:<br>
    </div>
    <blockquote
cite="mid:CALKBF2hAi22c9=8dwdBHwo9XgeF5pR5HBip4OrxOD4UGonhWUw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Neat!  Looks like a winner, at least until I have
        more than 2 platforms (this mechanism being based on exclusion,
        I have to "negate" the platform, which may yield multiple
        results).
        <div><br>
        </div>
        <div>André</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jul 27, 2016 at 9:54 AM, Ned
          Batchelder <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ned@nedbatchelder.com" target="_blank">ned@nedbatchelder.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>You can use environment variables in the .coveragerc
                file, so you can create a pattern for pragmas that uses
                environmental data.  For example: <a
                  moz-do-not-send="true"
                  href="https://github.com/habnabit/ebb-lint/blob/master/.coveragerc"
                  target="_blank">https://github.com/habnabit/ebb-lint/blob/master/.coveragerc</a>
                :<br>
              </p>
              <blockquote>
                <p><tt>[report]</tt><tt><br>
                  </tt><tt>exclude_lines =</tt><tt><br>
                  </tt><tt>    pragma: no ${TOX_ENVNAME}</tt><tt><br>
                  </tt><tt>    pragma: no ?cover</tt><br>
                </p>
              </blockquote>
              <p>--Ned.<br>
              </p>
              <div>
                <div class="h5">
                  <p><br>
                  </p>
                  <p> </p>
                  <div>On 7/26/16 6:33 PM, André Caron wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <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's not so
                        straightforward.</div>
                      <div><br>
                      </div>
                      <div>I'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'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'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'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 == 'win32':  # 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 moz-do-not-send="true"
href="https://coverage.readthedocs.io/en/coverage-4.1/excluding.html#advanced-exclusion"
                          target="_blank">https://coverage.readthedocs.io/en/coverage-4.1/excluding.html#advanced-exclusion</a></div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
testing-in-python mailing list
<a moz-do-not-send="true" href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a moz-do-not-send="true" href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            testing-in-python mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.idyll.org/listinfo/testing-in-python"
              rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>