muon-spectroscopy-computational-project / pymuon-suite

Collection of scripts and utilities for muon spectroscopy
GNU General Public License v3.0
8 stars 7 forks source link

Improve test coverage #48

Open elichad opened 2 years ago

elichad commented 2 years ago

Broad improvements needed to coverage:

Specific improvements to existing tests:

elichad commented 2 years ago

use TestCase.assertRaises with a specific exception type/message instead of catching/printing all Exceptions

elichad commented 2 years ago

Split existing tests into smaller units

patrick-austin commented 11 months ago

Updating with WIP information from #83

Notable uncovered areas

In addition to numerous exceptions and minor branches that are not covered (i.e. raising an exception if a file that should always be present is missing), the following areas have functional code that is currently untested but could be:

DFTB tests don't run, as _RUN_DFTB is hardcoded False. Haven't looked into this too much yet. Don't know if it's more feasible to try and install DFTB+ on the GHA runners or try and increase coverage by unit testing the following (currently uncovered) functions:

The following files have no coverage, and are not called anywhere else in the codebase. Could write tests for them, but is it worth it for code that is never used? May have value as library functions but it's not obvious to me if they do.

Following discussion with @leandro-liborio will keep the following:

And remove the following: