add pytest-cov instructions and requirements
ClosedPublic

Authored by kparal on Mar 6 2014, 1:41 PM.

Details

Summary

This adds instructions how create test coverage reports. It also adds a
requirement on pytest-cov. It could be a optional dependency, but then
the instructions wouldn't be that simple (you need to install it first)
and in this case I think it's better to provide this functionality out
of the box.

Test Plan

The listed commands work well for me.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
kparal updated this revision.Mar 6 2014, 1:46 PM
  • add note about functional tests
kparal updated this revision.Mar 6 2014, 2:02 PM
  • fix instructions to work with --functional
mkrizek accepted this revision.Mar 6 2014, 2:12 PM

LGTM

tflink added a comment.Mar 6 2014, 2:23 PM

My concern on adding pytest-cov to the requirements.txt is that it may cause problems when we start packaging libtaskotron because AFAIK, pytest-cov is not available in the fedora repos.

We can deal with that when the time comes, though.

kparal added a comment.Mar 6 2014, 3:05 PM

My concern on adding pytest-cov to the requirements.txt is that it may cause problems when we start packaging libtaskotron because AFAIK, pytest-cov is not available in the fedora repos.

It seems it is:

$ yum info python-pytest-cov
Loaded plugins: changelog, langpacks, refresh-packagekit
Available Packages
Name        : python-pytest-cov
Arch        : noarch
Version     : 1.6
Release     : 1.fc20
Size        : 12 k
Repo        : updates-testing/20/x86_64
Summary     : Pytest plugin for coverage reporting
URL         : https://pypi.python.org/pypi/pytest-cov
License     : MIT
Description : Py.test plugin for coverage reporting with support for both centralised and
            : distributed testing, including subprocesses and multiprocessing for Python 2.

I don't actually want to say that we need to have it as an RPM dependency (I haven't even thought about it, to be honest). For consumers of libtaskotron that doesn't probably make sense. My intention was to have a good developer environment set up easily. So we can use it as a build dependency (probably still not ideal), or drop it once we get to RPM packaging.

tflink added a comment.Mar 6 2014, 3:22 PM

It seems it is:

Cool, that's changed since the last time I checked.

I don't actually want to say that we need to have it as an RPM dependency (I haven't even thought about it, to be honest). For consumers of libtaskotron that doesn't probably make sense. My intention was to have a good developer environment set up easily. So we can use it as a build dependency (probably still not ideal), or drop it once we get to RPM packaging.

I'm running off of memory here and could be wrong, but the problem is more with setuptools/distutils and the reading of requirements.txt when you call python setup.py install. There are cases where that'll error out when requirements are unmet, regardless of what's specified in the spec file.

I could be wrong, though and it's just something to keep in mind. It'd be a pretty simple change to make if it is a problem so let's deal with that if it becomes an issue.

Looks good to me, please push to develop

kparal closed this revision.Mar 6 2014, 3:45 PM

Closed by commit rLTRN456904b1790e (authored by @kparal).