ISISNeutronMuon / ISISNeutronMuon/MDMC
Investigate `hypothesis` package for more robust testing
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 5
Description
Currently, many of our tests rely on pytest fixtures, which test specific cases (e.g. specific atoms, universe setups, etc.). There is a python library called `hypothesis` (https://hypothesis.readthedocs.io) which [allows the user to create 'strategies' for generating types of objects](https://hypothesis.readthedocs.io/en/latest/data.html) (e.g. an `atoms` strategy would create a random atom with a random position and velocity with bounds set by the user). The library then parameterises tests by randomly generated objects from these strategies, ensuring that our tests cover edge cases and other cases (rather than, say, just testing a Hydrogen atom in the centre of the `Universe`); this can both simplify and fortify our testing.
Investigate whether we can use `hypothesis` strategies to improve the quality of our testing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.