As a first step of the Pytest suite refactoring and extension, the model/observation/inference choices in the existing tests are explicitly parametrised as fixtures, and local (intra-module) redundancies are factored out. In a subsequent PR, the module hierarchy of the test suite will be reorganised.
Since the implied change set is of considerable size, at the time of opening this PR the refactoring is only carried out on a representative subset of the test suite, and will be extended over the rest upon initial feedback.
Changes proposed
standardize test discovery (unittest -> pytest)
extend model library in src/beanmachine/ppl/examples
create fixture helpers in tests/ppl/utils/fixtures.py
Motivation
As a first step of the Pytest suite refactoring and extension, the model/observation/inference choices in the existing tests are explicitly parametrised as fixtures, and local (intra-module) redundancies are factored out. In a subsequent PR, the module hierarchy of the test suite will be reorganised.
Since the implied change set is of considerable size, at the time of opening this PR the refactoring is only carried out on a representative subset of the test suite, and will be extended over the rest upon initial feedback.
Changes proposed
unittest
->pytest
)src/beanmachine/ppl/examples
tests/ppl/utils/fixtures.py
Test Plan
pytest
Types of changes
Checklist