[py-dev] pytest-cov options
holger krekel
holger at merlinux.eu
Wed Jun 9 14:55:23 CEST 2010
Hi Meme,
On Wed, Jun 09, 2010 at 20:13 +1000, meme dough wrote:
> The next version of coverage will be 3.4 and looks like it will
> contain a (nice) backward incompatible change. It has include and
> omit which are fnmatch patterns. Ned also mentioned that in addition
> there may be able to specify the roots of source code (but I haven't
> seen any code for this one yet).
do you know, is there going to be pytest-coverage plugin included by default?
> For pytest-cov I am considering refining to the options below.
>
> coverage reporting with distributed testing support:
> --cov=pat include coverage for filename pattern (multi-allowed)
> --cov-omit=pat exclude coverage for filename pattern (multi-allowed)
> ...
> This seems to work nicely, though it means you always have to specify
> like "my/source/root/*" for both --cov and --cov-omit. If the other
> option added then I will probably add one more so that it is in line
> with coverage.
my comments:
a) I guess you could also specify path relative to the CWD and they could
be expanded before passing it on. Makes them shorter.
b) is the "exclude" pattern applied after the include-pattern?
c) is it possible to specify python module/package names?
d) can the patterns above not be specified in the coverage rc file?
> --cov-report=type type of report to generate: term, term-missing,
> annotate, html, xml (multi-allowed)
> --cov-combine-each for dist=each mode produce a single combined report
why not make this the default if --dist=each is specified?
I don't imagine i'd be interested in separate reports if running --dist-each.
And if so, i can still run with just one target.
> --cov-config-file=path
> config file for coverage, default: .coveragerc
--cov-config=path is enough i think.
> I haven't committed yet and still playing but wanted to see if anyone
> had any suggestions.
let me/py-dev when you do so i can play around with it a bit after which
i can hopefully make more substantiated comments :)
holger
More information about the Pytest-dev
mailing list