diff mbox

tox: Omit tests and manage.py when running coverage tests

Message ID 1442933973-23527-1-git-send-email-damien.lespiau@intel.com
State Accepted
Headers show

Commit Message

Damien Lespiau Sept. 22, 2015, 2:59 p.m. UTC
Having the tests in the coverage reports artifically improve the
coverage percentage, because every line in tests is being run.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 tox.ini | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stephen Finucane Sept. 22, 2015, 3:39 p.m. UTC | #1
> Having the tests in the coverage reports artifically improve the

> coverage percentage, because every line in tests is being run.

> 

> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>


Good point.

Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
Stephen Finucane Sept. 22, 2015, 3:43 p.m. UTC | #2
> > Having the tests in the coverage reports artifically improve the

> > coverage percentage, because every line in tests is being run.

> >

> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

> 

> Good point.

> 

> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>


As an aside, still so much work to be done upping coverage :O PEP8 compliance and features first though.
Damien Lespiau Sept. 22, 2015, 3:53 p.m. UTC | #3
On Tue, Sep 22, 2015 at 04:43:17PM +0100, Finucane, Stephen wrote:
> > > Having the tests in the coverage reports artifically improve the
> > > coverage percentage, because every line in tests is being run.
> > >
> > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > 
> > Good point.
> > 
> > Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
> 
> As an aside, still so much work to be done upping coverage :O PEP8
> compliance and features first though.

I don't think PEP8 is a priority, it creates more pain than gain at the
moment because so many patches are in flight.
Stephen Finucane Sept. 22, 2015, 4:31 p.m. UTC | #4
> On Tue, Sep 22, 2015 at 04:43:17PM +0100, Finucane, Stephen wrote:
> > > > Having the tests in the coverage reports artifically improve the
> > > > coverage percentage, because every line in tests is being run.
> > > >
> > > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > >
> > > Good point.
> > >
> > > Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
> >
> > As an aside, still so much work to be done upping coverage :O PEP8
> > compliance and features first though.
> 
> I don't think PEP8 is a priority, it creates more pain than gain at the
> moment because so many patches are in flight.

Yes and no. No for files touched by existing submitted patches (features and bug fixes >>> style) but yes for all other files. Patches that improve code quality are a good thing.

Stephen
Damien Lespiau Sept. 22, 2015, 4:35 p.m. UTC | #5
On Tue, Sep 22, 2015 at 05:31:23PM +0100, Finucane, Stephen wrote:
> > On Tue, Sep 22, 2015 at 04:43:17PM +0100, Finucane, Stephen wrote:
> > > > > Having the tests in the coverage reports artifically improve the
> > > > > coverage percentage, because every line in tests is being run.
> > > > >
> > > > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > > >
> > > > Good point.
> > > >
> > > > Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
> > >
> > > As an aside, still so much work to be done upping coverage :O PEP8
> > > compliance and features first though.
> > 
> > I don't think PEP8 is a priority, it creates more pain than gain at the
> > moment because so many patches are in flight.
> 
> Yes and no. No for files touched by existing submitted patches
> (features and bug fixes >>> style) but yes for all other files.
> Patches that improve code quality are a good thing.

I'm not saying it's a bad thing, but that it does make rebasing patches
harder.
Stephen Finucane Sept. 22, 2015, 5:12 p.m. UTC | #6
> On Tue, Sep 22, 2015 at 05:31:23PM +0100, Finucane, Stephen wrote:
> > > On Tue, Sep 22, 2015 at 04:43:17PM +0100, Finucane, Stephen wrote:
> > > > > > Having the tests in the coverage reports artifically improve the
> > > > > > coverage percentage, because every line in tests is being run.
> > > > > >
> > > > > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > > > >
> > > > > Good point.
> > > > >
> > > > > Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
> > > >
> > > > As an aside, still so much work to be done upping coverage :O PEP8
> > > > compliance and features first though.
> > >
> > > I don't think PEP8 is a priority, it creates more pain than gain at the
> > > moment because so many patches are in flight.
> >
> > Yes and no. No for files touched by existing submitted patches
> > (features and bug fixes >>> style) but yes for all other files.
> > Patches that improve code quality are a good thing.
> 
> I'm not saying it's a bad thing, but that it does make rebasing patches
> harder.

Sorry, the point I was making is I don't think any PEP8 changes I've personally made touch files modified as part of (submitted) patches from other contributors? The one exception here is 'models.py' in the "test status" series, but that badly needed work. I'll continue this trend going forward.

Stephen
Damien Lespiau Sept. 23, 2015, 12:54 p.m. UTC | #7
On Tue, Sep 22, 2015 at 04:39:01PM +0100, Finucane, Stephen wrote:
> > Having the tests in the coverage reports artifically improve the
> > coverage percentage, because every line in tests is being run.
> > 
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> 
> Good point.
> 
> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com> 

Picked up for the next pull request. Thanks for the review!
Stephen Finucane Oct. 26, 2015, 8:43 p.m. UTC | #8
> On Tue, Sep 22, 2015 at 04:39:01PM +0100, Finucane, Stephen wrote:
> > > Having the tests in the coverage reports artifically improve the
> > > coverage percentage, because every line in tests is being run.
> > >
> > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> >
> > Good point.
> >
> > Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
> 
> Picked up for the next pull request. Thanks for the review!
> 
> --
> Damien

Merged.
diff mbox

Patch

diff --git a/tox.ini b/tox.ini
index 891fc5e..53d067e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -44,5 +44,6 @@  setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
 commands =
     coverage erase
-    coverage run --omit=*tox* --branch {toxinidir}/manage.py test patchwork
+    coverage run --omit=*tox*,patchwork/tests/*.py,manage.py --branch \
+        {toxinidir}/manage.py test patchwork
     coverage report -m