EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS

Explore the use of hypothesis in unit tests

Open
#465 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Description

[Hypothesis](https://hypothesis.readthedocs.io/en/latest/) is a testing library that evaluates functions under a range of conditions and evaluates the properties of the result, rather than testing functions with a single input and asserting the numerical value of the result (as is currently done in many places). It can be particularly useful for finding edge cases, which (as we are all well aware), MUSE is currently not very well set up to deal with.

The costs module seems like a good place to start (see [this comment](https://github.com/EnergySystemsModellingLab/MUSE_OS/pull/462#pullrequestreview-2262280761)), but there are probably other places that would benefit. Part of tackling this issue would involve going through the tests to see which areas could benefit from more robust unit tests.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.