<div dir="ltr">Here is how I ran coverage:<div><br></div><div>    coverage run --source=../src main.py<br></div><div><br></div><div>main.py imports a pyc file that resides in the same folder. The source of this pyc file is available in ../src.</div>

<div>(I created main.py just to go around the bug that you submitted above)</div><div><br></div><div>Lucian</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 5:05 AM, Ned Batchelder <span dir="ltr">&lt;<a 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"><div class="im">
    On 9/17/13 7:42 AM, Lucian Ciufudean wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">Hi guys,
        <div><br>
        </div>
        <div>I embarked on the road of obtaining a coverage report for
          functional tests against a server process. The server is
          deployed as .pyc files, and the source files can be made
          available in a separate subversion working folder. I wouldn&#39;t
          want to edit any existing .py files.</div>
        <div><br>
        </div>
        <div>Can coverage work with .pyc files - I am getting errors
          when using coverage run main.pyc from the command line, so
          maybe with the API? <br>
        </div>
      </div>
    </blockquote>
    <br></div>
    Hmm, you&#39;re right: &quot;coverage run foo.pyc&quot; does not work. I&#39;ve
    created a ticket for this:
<a href="https://bitbucket.org/ned/coveragepy/issue/264/coverage-wont-run-pyc-files" target="_blank">https://bitbucket.org/ned/coveragepy/issue/264/coverage-wont-run-pyc-files</a><div class="im"><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>I tired this also, my custom code is run but it can not
          find the source files at the time of coverage.html_report()
          although I passed the directory of source files to
          coverage.coverage.</div>
      </div>
    </blockquote>
    <br></div>
    You&#39;ll have to show details of how you tried to run coverage.  If
    the .py files are in the places reported by your program, then it
    should work.  You can also use the [paths] section of a .coveragerc
    to instruct coverage where the files are.<br>
    <br>
    --Ned.<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks a lot,</div>
        <div>Lucian</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
testing-in-python mailing list
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>