<!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 text="#000000" bgcolor="#ffffff">
On 7/20/2011 12:22 AM, Joesan Gabaldon wrote:
<blockquote
cite="mid:CAPfGs72mNsknLen84OSXLkcY_9mHWqz6iTcKdMjf7Jz9aKzd-w@mail.gmail.com"
type="cite">We have a script that launches both servers using
Popen but only one is measured. So the sequence of the commands
for the testsuite are:<br>
<br>
python ignition.py --start-with-pylonsserver
<div class="im"><br>
nosetests -v thisproject/tests_folder --with-coverage
--with-xunit --xunit-file=./nosetests.xml<br>
coverage xml --include=thisproject/*
--omit=./thisproject/tests_folder/* <br>
</div>
python ignition.py --kill<br>
<br>
I saw that subprocess page but didn't look into it much since that
one server is getting checked. I'll look into it in the morning
though, along with the debug command. Are there any conditions
where coverage would ignore certain folders/packages by default?<br>
<br>
</blockquote>
The only reason it would ignore them by default is it believes the
package is installed with the standard library.<br>
<br>
--Ned.<br>
<br>
<blockquote
cite="mid:CAPfGs72mNsknLen84OSXLkcY_9mHWqz6iTcKdMjf7Jz9aKzd-w@mail.gmail.com"
type="cite">(Ned sorry for the double email, forgot to hit "reply
all")<br>
<br>
- Joesan<br>
<br>
<div class="gmail_quote">On Tue, Jul 19, 2011 at 10:22 PM, Ned
Batchelder <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ned@nedbatchelder.com">ned@nedbatchelder.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"> To get coverage
measurement of subprocesses, you need to take some extra
steps, unless I'm missing something you're doing in the
description below. Are both servers started with Popen?
And one is measured and the other is not? You can check on
measurement with the "coverage debug data" command, which
will show you a summary of the data collected during the
last run.<br>
<br>
There's a page in the docs about getting subprocesses
measured: <a moz-do-not-send="true"
href="http://nedbatchelder.com/code/coverage/subprocess.html"
target="_blank">http://nedbatchelder.com/code/coverage/subprocess.html</a><br>
<br>
--Ned.
<div>
<div class="h5"><br>
<br>
On 7/19/2011 6:25 PM, Joesan Gabaldon wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hey all, I've been trying to figure this
out on and off for a couple months now (it hasn't
really been priority until recently) and I could
really use some help fixing this.<br>
<br>
I'm running a system which requires 2 serves to run,
one of them being a pylons project. For some reason
coverage doesn't seem to be checking any of the files
in the pylons server. I have a script which launches
both servers using Popen, with the pylons server
launched with the shell command "paster serve
development.ini". <br>
<br>
Nosetests & coverage are launched with:<br>
<br>
nosetests -v thisproject/tests_folder
--with-coverage --with-xunit
--xunit-file=./nosetests.xml<br>
coverage xml --include=thisproject/*
--omit=./thisproject/tests_folder/* <br>
<br>
I've also tried explicitly telling the coverage report
to include the pylons folder which is located at
"thisproject/clients/pylons_server":<br>
<br>
coverage xml
--include=thisproject/*,thisproject/clients/pylons_server
--omit=./thisproject/tests_folder/* <br>
<br>
But that doesn't seem to work, I suspect because that
folder is never even executed when nosetests is
running the tests. The functions are definitely
getting executed though as those tests pass, and other
files in the clients folder and subdirectories of
clients are getting included in the coverage report.
Anyone have any ideas?<br>
<br>
Joesan<br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
testing-in-python mailing list
<a moz-do-not-send="true" href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a moz-do-not-send="true" href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
<br>
</blockquote>
</body>
</html>