qiime2 / q2-diversity

BSD 3-Clause "New" or "Revised" License
4 stars 45 forks source link

coverage < 100% in q2_diversity/_beta/_method.py #255

Closed gwarmstrong closed 4 years ago

gwarmstrong commented 5 years ago

Improvement Description There are two lines that are not covered in q2_diversity/_beta/_method.py, which means anytime the number of lines in this repo is decreased, it will cause the coveralls to fail (e.g., #254 ).

The culprits are:

https://github.com/qiime2/q2-diversity/blob/4c235a003b6ab8ad6cca78935c33365a8903f1af/q2_diversity/_beta/_method.py#L73-L74

and

https://github.com/qiime2/q2-diversity/blob/4c235a003b6ab8ad6cca78935c33365a8903f1af/q2_diversity/_beta/_method.py#L120-L122

The first can probably be tested with unittest.mock and the second can be testing with something like this

Current Behavior Unittests fail if total number of lines is decreased in q2_diversity/_beta/_method.py

Proposed Behavior Unittests pass if total number of lines is decreased in q2_diversity/_beta/_method.py

Questions

ChrisKeefe commented 4 years ago

This issue was handled in part by replacing _method.py with _pipeline.py, and moving the relevant Methods to q2-diversity-lib. (#280). alpha and beta are now at 100% coverage in both plugins. https://github.com/qiime2/q2-diversity-lib/pull/6/files# resolves the first issue. https://github.com/qiime2/q2-diversity-lib/pull/24 should resolve the canberra-adkins issue by removing that guard. (as @gwarmstrong suggested, we'll trust skbio on this)