<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>"coverage run" is meant to be a replacement for "python". So
"python foo.py" can become "coverage run foo.py", and "python -m
foo" can become "coverage run -m foo". Coverage.py doesn't know
how to run commands, though there is an open ticket requesting
that feature.</p>
<p>If you know your command is actually a Python program, you can
try: coverage run `which nosetests`</p>
<p>André has the right answer for nose, since it will run as a
module.</p>
<p>--Ned.<br>
</p>
<br>
<div class="moz-cite-prefix">On 5/27/16 8:38 AM, André Caron wrote:<br>
</div>
<blockquote
cite="mid:CALKBF2jk0MbQ6svc94agBzE55DHr1HnLZtHB9aj-cawHqeDbgw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>This is how I do it:</div>
<div><br>
</div>
coverage run -m nose ...
<div><br>
</div>
<div>André</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 27, 2016 at 8:29 AM, Chris
Withers <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:chris@simplistix.co.uk" target="_blank">chris@simplistix.co.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">On
06/01/2016 18:30, Ned Batchelder wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
FWIW, I strongly prefer using coverage to run nose rather
than the other<br>
way around. I guess that's to be expected :) This may be
an effect of<br>
the nose coverage plugin somehow.<br>
</blockquote>
<br>
How do you do this?<br>
<br>
my naive:<br>
<br>
coverage run nosetests<br>
<br>
...gives "No file to run: 'noestests"<br>
<br>
Chris<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a moz-do-not-send="true"
href="mailto:testing-in-python@lists.idyll.org"
target="_blank">testing-in-python@lists.idyll.org</a><br>
<a moz-do-not-send="true"
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>
<br>
</div>
</blockquote>
<br>
</body>
</html>