EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
Explore the use of hypothesis in unit tests
- Lingua principale
- Python
- Stelle
- 29
- Fork
- 12
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
[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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia esaminando i test unitari esistenti nel modulo costs e la discussione collegata da PR #462. Esamina poi gli altri test alla ricerca di casi che potrebbero beneficiare di una copertura basata su Hypothesis; il lavoro è considerato completato quando vengono individuate le aree adatte e l’approccio viene applicato dove migliora il test dei casi limite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 28/100