Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage > 99% ;) #277

Open
llonchj opened this issue May 25, 2015 · 5 comments
Open

Improve test coverage > 99% ;) #277

llonchj opened this issue May 25, 2015 · 5 comments
Labels
Development/Contribution Documentation Documentation for developers/maintainers QOL Quality of life improvements for development
Projects

Comments

@llonchj
Copy link
Contributor

llonchj commented May 25, 2015

Improve code coverage

Name                              Stmts   Miss  Cover   Missing
---------------------------------------------------------------
hyde                                  0      0   100%
hyde.engine                          82     32    61%   49, 93-102, 119-130, 144-150, 157-160
hyde.exceptions                       4      0   100%
hyde.ext                              0      0   100%
hyde.ext.plugins                      0      0   100%
hyde.ext.plugins.blog                20      1    95%   24
hyde.ext.plugins.css                202     52    74%   68, 75, 116-117, 163, 172-177, 184, 196-197, 229, 247-253, 259, 263, 269-273, 280-301, 307-310, 325-326, 344-345
hyde.ext.plugins.depends             21      0   100%
hyde.ext.plugins.images             278     83    70%   26-31, 59-60, 68, 71-72, 82-84, 88-92, 97, 101, 113-114, 120-121, 133, 266, 279, 297-298, 300-301, 307, 324, 330-331, 340-341, 343-344, 348-349, 374, 381, 389-416, 427, 434, 437, 445-474, 508-509, 515-516
hyde.ext.plugins.js                  77     19    75%   47-48, 131-132, 146, 150, 157, 163-167, 176-183
hyde.ext.plugins.meta               370     19    95%   125, 183, 233, 252-253, 323, 325, 336-337, 376, 437-438, 516, 611-612, 628-629, 634, 739
hyde.ext.plugins.structure          164      9    95%   37-38, 46-47, 97-98, 132-133, 177
hyde.ext.plugins.text                71      4    94%   136, 181-182, 223
hyde.ext.plugins.urls                32      2    94%   44, 47
hyde.ext.publishers                   0      0   100%
hyde.ext.templates                    0      0   100%
hyde.ext.templates.jinja            408     75    82%   63, 68, 78-90, 100-106, 115-117, 135-137, 146, 158-160, 168, 185-188, 195, 204-205, 235, 260, 286, 311, 349, 352-353, 363-369, 389-394, 400, 414, 441, 479, 609-613, 685, 690-694, 728-729, 751-752, 769, 825
hyde.generator                      232     27    88%   61-66, 135, 153, 156, 174-175, 178-179, 183-184, 190, 195, 251, 261-262, 287, 296-297, 301-303, 339
hyde.layout                          19      0   100%
hyde.lib                              0      0   100%
hyde.lib.pygments                     0      0   100%
hyde.lib.pygments.rst_directive      25      2    92%   74-76
hyde.model                          127      6    95%   146-147, 189, 201-203
hyde.plugin                         217     14    94%   82, 116, 335, 361, 365, 403-404, 420-421, 442, 445, 459, 466, 473
hyde.site                           227     20    91%   98, 100, 126, 165, 178, 200-203, 299, 335, 362, 370, 378-379, 415-417, 439, 465
hyde.template                        55     17    69%   26-27, 32, 36, 70, 76, 83, 91, 100, 104, 111, 119, 127, 134, 141, 148, 155
hyde.util                            30      1    97%   57
hyde.version                          2      0   100%
---------------------------------------------------------------
TOTAL                              2663    383    86%
----------------------------------------------------------------------
@navilan
Copy link
Member

navilan commented Sep 1, 2015

@llonchj, @jonafato - Couple of points:

  1. My coverage summary shows 74% overall (instead of the 86% above)
  2. How important useful will it be to get to 99%? Lot of the uncovered code seems to fall squarely into CLI code or exception flow.

@pradyunsg
Copy link

Something worth noting... High test coverage != good tests.

http://martinfowler.com/bliki/TestCoverage.html

@navilan
Copy link
Member

navilan commented Oct 24, 2015

@pradyunsg - Thats true. @llonchj has been trying to increase coverage so that we can be reasonably confident about python 3.x compatibility. Tests do have diminishing returns, so the goal is to get to a point where we are okay with what we have and gear up towards python 3.x.

@jonafato
Copy link
Member

It's definitely true that picking 99% as an arbitrary coverage goal cannot guarantee good tests, but a good test suite usually implies high coverage. i.e. if a function is tested sufficiently, its coverage is likely to be high; as more functions become well tested, coverage goes up. Arguably, the title should be more toward "improve tests" than "improve test coverage" (ideally starting with the core and expanding from there), but that's probably just semantics :).

@llonchj
Copy link
Contributor Author

llonchj commented Oct 31, 2015

+1

2015-11-01 8:38 GMT+11:00 Jon Banafato notifications@github.com:

It's definitely true that picking 99% as an arbitrary coverage goal cannot
guarantee good tests, but a good test suite usually implies high coverage.
i.e. if a function is tested sufficiently, its coverage is likely to be
high; as more functions become well tested, coverage goes up. Arguably, the
title should be more toward "improve tests" than "improve test coverage"
(ideally starting with the core and expanding from there), but that's
probably just semantics :).


Reply to this email directly or view it on GitHub
#277 (comment).

jonafato added a commit that referenced this issue Jan 29, 2016
Add the ``coverage`` plugin to ``nosetests`` commands run by ``tox``.
References #277. Additionally, add a few more compatibility imports.
@Descent098 Descent098 removed this from the Version 1.0.0 milestone Mar 19, 2020
@Descent098 Descent098 added Development/Contribution Documentation Documentation for developers/maintainers QOL Quality of life improvements for development labels Mar 19, 2020
@Descent098 Descent098 added this to TODO in V0.9.0 Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development/Contribution Documentation Documentation for developers/maintainers QOL Quality of life improvements for development
Projects
V0.9.0
  
TODO
Development

No branches or pull requests

5 participants