Closed David-Kreplin closed 1 year ago
I hope that tests most of the layered_feature_map.py file.
I think adding tests for the executability of the final feature maps would be helpful (for both, from_string and regularly build ones).
Also, it could make sense to use the parameterize fixture
Also, it could make sense to use the parameterize fixture
What do you mean with parameterize fixture?
Also, it could make sense to use the parameterize fixture
What do you mean with parameterize fixture?
You can define resuable fixtures (e.g. instances of classes) that can be called in the tests without redefining it in every test. If you want one test to apply to multiple fixutres, you can parametrize them in a decorator. You can look at the qsvc tests as examples. Here, projected and fidelity instances are defined as fixtures which are then called with the parametrized "qsvc" variable, e.g. in test_predict (line 80)
Added
Also, it could make sense to use the parameterize fixture
What do you mean with parameterize fixture?
You can define resuable fixtures (e.g. instances of classes) that can be called in the tests without redefining it in every test. If you want one test to apply to multiple fixutres, you can parametrize them in a decorator. You can look at the qsvc tests as examples. Here, projected and fidelity instances are defined as fixtures which are then called with the parametrized "qsvc" variable, e.g. in test_predict (line 80)
I understand! In this case, however, building the longer feature map is also kind of a test.
Added
Also, it could make sense to use the parameterize fixture
What do you mean with parameterize fixture?
You can define resuable fixtures (e.g. instances of classes) that can be called in the tests without redefining it in every test. If you want one test to apply to multiple fixutres, you can parametrize them in a decorator. You can look at the qsvc tests as examples. Here, projected and fidelity instances are defined as fixtures which are then called with the parametrized "qsvc" variable, e.g. in test_predict (line 80)
I understand! In this case, however, building the longer feature map is also kind of a test.
I meant for readability and reusability of the test but I'm fine with it, as it is now, aswell
solves #133