<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 5:34 PM DZIOBEK, JOE <<a href="mailto:jd5948@att.com">jd5948@att.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="m_-5386452341411089829WordSection1">
<p class="MsoNormal"><br></p></div></div><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="m_-5386452341411089829WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">PS: Bruno, your idea with adding the import to the __init__.py file is good, but requires someone to update that file, probably the same person that forgot to
write the test.py;</span></p></div></div></blockquote><div><br></div><div>I see, but anyway I completely missed your --source=. parameter, so I defer to our coverage expert. :)</div><div><br></div><div>Cheers,</div><div>Bruno</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="m_-5386452341411089829WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks for your help,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Regards - Joe<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> <a href="mailto:testing-in-python-bounces@lists.idyll.org" target="_blank">testing-in-python-bounces@lists.idyll.org</a> [mailto:<a href="mailto:testing-in-python-bounces@lists.idyll.org" target="_blank">testing-in-python-bounces@lists.idyll.org</a>]
<b>On Behalf Of </b>Ned Batchelder<br>
<b>Sent:</b> Friday, January 04, 2019 11:59 AM<br>
<b>To:</b> <a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<b>Subject:</b> Re: [TIP] Can pytest identify python code that has no test<u></u><u></u></span></p>
</div>
</div></div></div><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="m_-5386452341411089829WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<p>Joe, since you have specified "--source=.", coverage will search your tree for importable Python files, and report on them even if they are never imported. So you are already doing the right thing. I'm not sure why it wouldn't show you that file. Are you
sure you are running the commands you showed?<u></u><u></u></p>
<p>--Ned.<u></u><u></u></p>
<div>
<p class="MsoNormal">On 1/4/19 11:42 AM, Bruno Oliveira wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Joe,<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Dec 21, 2018 at 5:06 PM DZIOBEK, JOE <<a href="mailto:jd5948@att.com" target="_blank">jd5948@att.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Is there a way to have this file included in the report?<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You are not seeing coverage information for scriptB.py not because it does not have an associated test file, but because it was never imported during the run (I'm assuming). <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">One way to have it to appear on the report is to import scriptB on your __init__.py file, this way its coverage will be tracked.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hope this helps,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Bruno<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<pre>_______________________________________________<u></u><u></u></pre>
<pre>testing-in-python mailing list<u></u><u></u></pre>
<pre><a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><u></u><u></u></pre>
<pre><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.idyll.org_listinfo_testing-2Din-2Dpython&d=DwMDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=HqXpIkByGFw24obqdoDmDw&m=pzoCcDdzPm0JZq_KFlE4flon2ylEw7Wn8WlOaZn3xgc&s=LZn-2waQlWLtBfotLco8eIxWEeII9mXtCXPlJ8rxaos&e=" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><u></u><u></u></pre>
</blockquote>
</div></div>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div></div>