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

Testing coverage #38

Closed
dennissiemensma opened this issue Feb 5, 2016 · 9 comments
Closed

Testing coverage #38

dennissiemensma opened this issue Feb 5, 2016 · 9 comments
Assignees
Milestone

Comments

@dennissiemensma
Copy link
Member

Originally reported by: Dennis Siemensma (Bitbucket: dennissiemensma, GitHub: dennissiemensma)


We should have coverage tested as well. Services should be covered 100%.


@dennissiemensma
Copy link
Member Author

Original comment by Dennis Siemensma (Bitbucket: dennissiemensma, GitHub: dennissiemensma):


We should check this out as well: https://travis-ci.org/

Linked to github and free for open source.

@dennissiemensma dennissiemensma modified the milestones: 1.0.0, 1.1.0 Feb 7, 2016
@dennissiemensma dennissiemensma self-assigned this Feb 16, 2016
@dennissiemensma
Copy link
Member Author

Completed #48, I should be able to add coverage as well.

@dennissiemensma
Copy link
Member Author

Currently checking out https://codeclimate.com

@dennissiemensma
Copy link
Member Author

It does not support Python (yet) too bad. First I'll have to get code coverage working locally, using nose & coverage.

dennissiemensma added a commit that referenced this issue Feb 17, 2016
@dennissiemensma
Copy link
Member Author

After a config hell I finally managed. I also found a bug involving postgresql, so I'll skip nosetest for that one. Further more my polib tests failed, as they call makemessages, which also included generated coverage html reports, crashing it. Pfffff.

At first my coverage seemed 40%, but after excluding Django and other third party modules it somehow reaches 93%!?

..............................................................
Name                                                             Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------------------------
dsmr_backend/management.py                                           0      0   100%   
dsmr_backend/management/commands.py                                  0      0   100%   
dsmr_backend/management/commands/dsmr_backend.py                    12      1    92%   19
dsmr_consumption/services.py                                        99      4    96%   101, 152, 208, 226
dsmr_datalogger/dsmr.py                                              1      0   100%   
dsmr_datalogger/management.py                                        0      0   100%   
dsmr_datalogger/management/commands.py                               0      0   100%   
dsmr_datalogger/management/commands/dsmr_datalogger.py              13      1    92%   16
dsmr_datalogger/services.py                                         77      2    97%   31-32
dsmr_frontend/management.py                                          0      0   100%   
dsmr_frontend/management/commands.py                                 0      0   100%   
dsmr_frontend/management/commands/dsmr_frontend_clear_cache.py      11      0   100%   
dsmr_frontend/templatetags.py                                        0      0   100%   
dsmr_frontend/templatetags/model_meta_info.py                        4      0   100%   
dsmr_frontend/urls.py                                                9      0   100%   
dsmr_frontend/views.py                                               0      0   100%   
dsmr_frontend/views/dashboard.py                                    53      7    87%   30-32, 64-69, 95-96
dsmr_frontend/views/history.py                                      37      0   100%   
dsmr_frontend/views/statistics.py                                   24      0   100%   
dsmr_frontend/views/status.py                                       16      0   100%   
dsmr_frontend/views/trends.py                                       23     10    57%   20-77, 82
dsmr_stats/management.py                                             0      0   100%   
dsmr_stats/management/commands.py                                    0      0   100%   
dsmr_stats/management/commands/dsmr_stats_compactor.py              13      0   100%   
dsmr_stats/management/commands/dsmr_stats_datalogger.py             11      0   100%   
dsmr_stats/services.py                                              66      9    86%   30-32, 62, 144-155
dsmr_weather/services.py                                            20      0   100%   
dsmrreader/formats.py                                                0      0   100%   
dsmrreader/formats/en.py                                             0      0   100%   
dsmrreader/formats/en/formats.py                                     3      0   100%   
dsmrreader/formats/nl.py                                             0      0   100%   
dsmrreader/urls.py                                                   3      0   100%   
----------------------------------------------------------------------------------------------
TOTAL                                                              495     34    93%   
----------------------------------------------------------------------

dennissiemensma added a commit that referenced this issue Feb 17, 2016
dennissiemensma added a commit that referenced this issue Feb 17, 2016
dennissiemensma added a commit that referenced this issue Feb 17, 2016
@dennissiemensma
Copy link
Member Author

Managed to get coverage to 98%. Last few percent will be taken care of later. At least I have a coverage to preserve when writing new code.

@dennissiemensma
Copy link
Member Author

For some reason Python 3.5 crashes in Travis.

dennissiemensma added a commit that referenced this issue Feb 17, 2016
@dennissiemensma
Copy link
Member Author

I'll have python 3.5 dropped as I cannot install it locally and Raspbian defaults to 3.4 (for now).

@dennissiemensma
Copy link
Member Author

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant