Skip to content

Improved handling/test of calculator commands

Ask Hjorth Larsen requested to merge calculator-command-handling into master

Checklist

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

Merge request reports