<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Ned,</p>
    <p>I hope so!</p>
    <p>The core of my mp code is:</p>
    <p>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
    </p>
    <pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:9.0pt;">pool = Pool(<span style="color:#660099;">processes</span>=processes, <span style="color:#660099;">initializer</span>=init)
result = pool.imap_unordered(func, iterable)
started = datetime.now()
<span style="color:#000080;font-weight:bold;">try</span>:
    <span style="color:#000080;font-weight:bold;">if </span>progress:
        i = show_progress(started, result)
    <span style="color:#000080;font-weight:bold;">else</span>:
        <span style="color:#000080;font-weight:bold;">for </span>i, _ <span style="color:#000080;font-weight:bold;">in </span><span style="color:#000080;">enumerate</span>(result): <span style="color:#000080;font-weight:bold;">pass
</span><span style="color:#000080;font-weight:bold;">finally</span>:
    pool.terminate()
    pool.join()
</pre>
    Does that look write/wrong?<br>
    <br>
    Chris<br>
    <br>
    <div class="moz-cite-prefix">On 07/09/2016 11:09, Ned Batchelder
      wrote:<br>
    </div>
    <blockquote
      cite="mid:77e8449f-9787-68f8-ab00-9b77cfa3fa20@nedbatchelder.com"
      type="cite">
      <pre wrap="">Chris,

Do your workers exit cleanly?

--Ned.


On 9/6/16 5:19 PM, Chris Withers wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi All,

I run my tests like this:

coverage run --concurrency=multiprocessing --source myproject,tests -m
nose &amp;&amp; coverage report --skip-covered --show-missing

Some of the code is only reached by being called by some
multiprocessing.Pool workers, the pool being instantiated and fed by
one of the functions under test.

After running the above, I see:

$ ls -lah .coverage*
-rw-r--r--+ 1 chris  staff    25K  6 Sep 19:31 .coverage
-rw-r--r--+ 1 chris  staff     0B  6 Sep 19:30
.coverage.tweedledee.26019.082222
-rw-r--r--+ 1 chris  staff     0B  6 Sep 19:30
.coverage.tweedledee.26020.787224
-rw-r--r--+ 1 chris  staff     0B  6 Sep 19:30
.coverage.tweedledee.26021.467684
-rw-r--r--+ 1 chris  staff     0B  6 Sep 19:30
.coverage.tweedledee.26022.663538

So, it looks like coverage is trying to record information in the
worker processes by failing. What might be the issue and how can I fix
it?

cheers,

Chris


_______________________________________________
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>
      <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>