Improved handling/test of calculator commands
Checklist
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.
I am trying to enable systematic testing of all calculators in the source code so we can do a smooth transition to the new config system.
For that I want to write a test parametrized over all calculators, which mocks Popen in a way that allows us to verify that an expected command is produced in all sorts of ways (i.e., ensure backwards compatibility and issue future warnings systematically).
However to write such a test I need to instantiate calculators which the previous calculator test skipping mechanism didn't allow. Hence:
- Define "factories" for all calculators that can be tested
- Factories are visible in test header
-
--calculators <names>
enables/disables those calculators as normal, but they're still defective in the sense that the test suite has no control over their settings - Remove old code for parametrizing calculator tests over calculators that do not have a factory
- Update calculator tests to always depend on appropriate factory fixtures
Edited by Ask Hjorth Larsen