Closed jduerholt closed 8 months ago
The problem regarding our test suite is, that it is still a mix between the old everest and the new bofire and that the difference between data models and functional models is not properly reflected. Furthermore, the folder structure of the test suite is not following the actual strucuture in the code. What I did here was a tidy-up in which I copied tests (just within tests/bofire/data_models
into the correct files and removed duplicate tests.
A good example is how test_features.py
looked before this PR, it contained tests regarding the feature containers (bofire/data_models/domain/features.py
) and the actual features (bofire/data_models/features/*
). I moved the tests to the correct places. In a next step I want to tidy-up the rest of the test suite, as we also have for example in (tests/bofire/strategies
) tests that belong to the data models and not to the functional models.
So in general, this PR is not adding anything new, but just copying stuff to the correct places.
Minor new things are:
add_invalid
in tests/bofire/data_models/specs
. All invalid specs registered there, are tested in tests/bofire/data_models/test_invalid.py
tests/bofire/data_models
, we have an easier setup of the minimal installation test suite by just running pytest /test/bofire/data_models
.bofire/data_models/base.py
in two files, namely bofire/data_models/base.py
and bofire/data_models/filters.py
, as the filter methods are independet from the modified pydantic base class.I hope this helps, I will then wait with merging it in, or what do you think?
Thank you @jduerholt for the overview. I approve :)
Thanks!
This PR refactors the test suite for the data models, as this was still a mix between Everest and BoFire. In a follow up PR, the rest of the test suite should be tidied up.