EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2

Improve test coverage for `input` module

Open
#1,248 0 comments 0 reactions 0 assignees View on GitHub
good first issue muse xiii test
Dominant language
Rust
Stars
8
Forks
5
Avg merge
1d 2m
Merged PRs (30d)
37

Description

The test coverage could be better. Use `cargo llvm-cov` to find areas of the code that aren't covered (see [relevant section of our docs on how to use this](https://energysystemsmodellinglab.github.io/MUSE2/developer_guide/coding.html#checking-test-coverage)).

In most cases, it probably makes sense to use patched examples rather than writing traditional unit tests for it, but the main thing is that the tests are targeted, as opposed to many of the regression tests we have now (not all though!).

I just ran `cargo llvm-cov` and it seems most of the places that aren't covered are error paths for input files, which should be eminently testable 😄. Hopefully you should be able to write tests using the `simple` example, but, if that proves difficult, we may have to do #1080 first.

It's fine not to have 100% coverage for this module. This issue is just about improving things.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.