<br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 9:59 AM, Ned Batchelder <span dir="ltr">&lt;<a href="mailto:ned@nedbatchelder.com">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">
    Programmatically, there&#39;s
    coverage.coverage(data_file=&quot;/path/to/datafile&quot;), and in the
    configuration file, there&#39;s &quot;[run] data_file=/path/to/datafile&quot;.  Is
    there another way you need to specify it?<br><font color="#888888">
    <br>
    --Ned</font></div></blockquote><div><br></div><div>It would be nice to have `data_file` to be exposed so I could pass it in via the command line. </div><div><br></div><div>The problem with using the configuration file is that this is not something static. Different projects in different directories have .coverage files that</div>

<div>I am interested in.</div><div><br></div><div>I still think that better than a command line option would be that coverage can crawl up until it finds a .coverage file to report on it (if there is none in the</div><div>

current directory). That way is automatic and you don&#39;t really need to be thinking about where you are and where was coverage run from.</div><div><br></div><div>But that is a design decision and you will probably have your own thoughts on this.</div>

<div><br></div><div>My case scenario still holds though: &quot;I&#39;m several directories in and want to check the coverage report but it comes empty. So I have to go up until I am in the same directory where the .coverage file is.&quot;</div>

<div><br></div><div>-Alfredo </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF" text="#000000"><div><div></div><div class="h5"><br>
    <br>
    On 8/2/2011 10:18 AM, Alfredo Deza wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">I was trying to look for an option in `coverage.py`
      that would accept a `.coverage` file as an input.
      <div><br>
      </div>
      <div>Usually `.coverage` is placed from wherever the command was
        run.</div>
      <div><br>
      </div>
      <div>Is there such an option and I am just failing to find it? Or
        is this something that could be accepted as</div>
      <div>a feature request?</div>
      <div><br>
      </div>
      <div>Probably something that makes coverage.py crawl back up in
        directories until it finds a `.coverage` file </div>
      <div>(a la git/hg) would make even more sense than an input file
        flag.</div>
      <div><br>
      </div>
      <div>My reasoning for this is because a lot of times I find myself
        several directories deep into a project that has</div>
      <div>run coverage before but I can&#39;t get the proper report since
        there is no `.coverage` in the current directory.</div>
      <div><br>
      </div>
      <div>Has anyone experienced something like this before? What are
        your workarounds (if any) ?</div>
      <div><br>
      </div>
      <div>Thanks!</div>
      <div><br>
      </div>
      <div>-Alfredo</div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><div class="im"><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>
    </div></blockquote>
  </div>

</blockquote></div><br>