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 testing code coverage #148

Open
JamesOwers opened this issue Aug 26, 2020 · 0 comments
Open

improve testing code coverage #148

JamesOwers opened this issue Aug 26, 2020 · 0 comments
Assignees

Comments

@JamesOwers
Copy link
Owner

JamesOwers commented Aug 26, 2020

We're at 60%. To regenerate the report with lines that need covering, run pytest -vv --cov --cov-report term-missing

Also you can get nice reports with:

pytest --cov-report html
open htmlcov/index.html
========================================================================== test session starts ===========================================================================
platform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /Users/jfowers/git/midi_degradation_toolkit, configfile: setup.cfg, testpaths: mdtk/tests
plugins: cov-2.10.1
collected 29 items                                                                                                                                                       

mdtk/tests/test_degradations.py ............                                                                                                                       [ 41%]
mdtk/tests/test_df_utils.py ...                                                                                                                                    [ 51%]
mdtk/tests/test_downloaders.py ......                                                                                                                              [ 72%]
mdtk/tests/test_fileio.py ........                                                                                                                                 [100%]

---------- coverage: platform darwin, python 3.8.5-final-0 -----------
Name                              Stmts   Miss  Cover
-----------------------------------------------------
mdtk/__init__.py                      6      0   100%
mdtk/degradations.py                372     23    94%
mdtk/degrader.py                     46     46     0%
mdtk/df_utils.py                     44      3    93%
mdtk/downloaders.py                 124      4    97%
mdtk/eval.py                         64     64     0%
mdtk/fileio.py                       71      5    93%
mdtk/filesystem_utils.py             47     19    60%
mdtk/formatters.py                  177    177     0%
mdtk/inspection.py                   89     89     0%
mdtk/pytorch_datasets.py            125    125     0%
mdtk/pytorch_models.py               91     91     0%
mdtk/pytorch_trainers.py            336    336     0%
mdtk/tests/__init__.py                0      0   100%
mdtk/tests/test_degradations.py     438      8    98%
mdtk/tests/test_df_utils.py          45      0   100%
mdtk/tests/test_downloaders.py       42      0   100%
mdtk/tests/test_fileio.py           218      0   100%
-----------------------------------------------------
TOTAL                              2335    990    58%

@JamesOwers JamesOwers added this to the Dataset Public Release milestone Aug 26, 2020
@JamesOwers JamesOwers self-assigned this Aug 26, 2020
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