<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Doug, thanks for reporting this. If you don't get a toy TG project
working, here are two things to try:<br>
<br>
1) Try running coverage with the -L switch to include tracing the std
lib. This is just to see if the stdlib-exclusion code is at fault.<br>
<br>
2) If you can pull the latest code from bitbucket
(<a class="moz-txt-link-freetext" href="http://bitbucket.org/ned/coveragepy/get/tip.gz">http://bitbucket.org/ned/coveragepy/get/tip.gz</a>), there's commented-out
logging of the decision of what to trace and what not to.
At line 123 of control.py is an "if 0:". Change it to "if 1:", then
run coverage. You'll get a line for each source file considered,
showing the decision of whether to trace it or not. If you don't mind
showing the filenames of your code, that log could be
helpful in understanding what's going on here.<br>
<br>
--Ned.<br>
<a class="moz-txt-link-freetext" href="http://nedbatchelder.com">http://nedbatchelder.com</a><br>
<br>
Doug Latornell wrote:
<blockquote
cite="mid:6279c0a40907151625w5333db60vd542d1bf224511b3@mail.gmail.com"
type="cite"><span style="font-family: times new roman,serif;">I'm
having a similar problem running coverage 3.0.1 on a Turbogears 1.05
project.</span><br style="font-family: times new roman,serif;">
<br style="font-family: times new roman,serif;">
<span style="font-family: times new roman,serif;">Initially I had
nose 0.10.3 and coverage 3.0.1 and got a coverage report like this:</span><br>
<br>
<span style="font-family: courier new,monospace;">Name
Stmts Exec Cover Missing</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-----------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva
1 1 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.config
1 1 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.controllers
409 0 0% 38-853</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.graphs
353 0 0% 13-527</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.init_database
91 0 0% 10-274</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.logs
23 0 0% 9-55</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.model
298 0 0% 2-794</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.release
7 0 0% 2-41</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.scheduled_jobs
259 0 0% 9-555</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.templates
1 1 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.utils
38 0 0% 15-80</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.widgets
99 0 0% 2-308</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-----------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">TOTAL
1580 3 0%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">----------------------------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Ran 109 tests in
85.575s</span><br style="font-family: courier new,monospace;">
<br>
Upgraded nose to 0.11.1 and got the same result. Downgraded coverage
to 2.85 and got:<br>
<br>
<span style="font-family: courier new,monospace;">Name
Stmts Exec Cover Missing</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-----------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva
0 0 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.config
0 0 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.controllers
378 260 68% 81, 93-94, 112-125, 137-166, 222, 258-306,
369, 374-375, 497-512, 535-553, 662-665, 685-709, 789</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.graphs
353 296 83% 38-40, 42-44, 46-48, 51-53, 59-86, 129-131,
145-147, 215-217, 292-294, 302-304, 312-314, 322-324, 332-334, 443-445,
447, 460-462, 477-479</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.init_database
91 86 94% 267-274</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.logs
23 23 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.model
297 287 96% 99-102, 113, 443-444, 448-449, 546</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.release
6 6 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.scheduled_jobs
259 75 28% 66-225, 235-261, 269-272, 279-281, 288-394,
402-429, 538-555</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.templates
0 0 100%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.utils
38 28 73% 41-49, 59, 62-67</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">zemiva.widgets
98 95 96% 119, 131, 189</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-----------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">TOTAL
1543 1156 74%</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">----------------------------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Ran 109 tests in
470.762s</span><br>
<br>
<span style="font-family: times new roman,serif;">I created at toy
project and got a sane result with nose 0.11.1 and coverage 3.0.1:</span><br>
<br>
<span style="font-family: courier new,monospace;">Name Stmts
Exec Cover Missing</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">---------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">bar 1
1 100%</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">bar.baz 4
3 75% 6</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">foo 3
3 100%</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">---------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">TOTAL 8
7 87%</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">----------------------------------------------------------------------</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Ran 2 tests in
0.020s</span><br>
<br>
<span style="font-family: times new roman,serif;">So, it looks like
the problem arises from something the in the Turbogears project, not
coverage or nose+coverage. I'll try to create a toy TG project to see
if I can reproduce the problem there.<br>
<br>
Any suggestions are welcome.<br>
<br>
Doug<br>
</span><br>
On Thu, Jul 9, 2009 at 2:02 PM, Ned Batchelder <<a
moz-do-not-send="true" href="mailto:ned@nedbatchelder.com">ned@nedbatchelder.com</a>>
wrote:<br>
><br>
> Oh, and if this is the stackoverflow question you meant:<br>
> <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/931248/coverage-not-showing-executed-lines-in-virtualenv">http://stackoverflow.com/questions/931248/coverage-not-showing-executed-lines-in-virtualenv</a><br>
> , that problem was fixed in 3.0. Maybe there's more to it than I
know...<br>
><br>
> --Ned.<br>
> <a moz-do-not-send="true" href="http://nedbatchelder.com">http://nedbatchelder.com</a><br>
><br>
> Matthew Wilson wrote:<br>
> > I just upgraded to the 3.0.1 version of coverage. Then I ran
this<br>
> > command to test some of my code:<br>
> ><br>
> > $ nosetests --with-coverage --cover-package
bazman.shiftcontrollers<br>
> > bazman/tests/controller_tests/test_shifttemplatecontrollers.py<br>
> ><br>
> > And the output showed ZERO lines covered. So then I found a
comment<br>
> > at stackoverflow saying that somebody went back to the old
version,<br>
> > and all was well. So I did that, and sure enough, I saw my
coverage<br>
> > again.<br>
> ><br>
> > I'll happily provide more details.<br>
> ><br>
> > Matt<br>
> ><br>
> ><br>
> ><br>
> ><br>
><br>
> --<br>
> Ned Batchelder, <a moz-do-not-send="true"
href="http://nedbatchelder.com">http://nedbatchelder.com</a><br>
><br>
><br>
><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">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ned Batchelder, <a class="moz-txt-link-freetext" href="http://nedbatchelder.com">http://nedbatchelder.com</a>
</pre>
</body>
</html>