Skip to content

Test calculator commands

Ask Hjorth Larsen requested to merge test-calculator-commands into master

Checklist

This depends on !3140 (merged).

This adds a test for as many calculators as possible which mocks subprocess.Popen so we can see what they really do. What they really do is not pretty, but we'll cover a lot of code this way (not very well, but it's something) and be able to deprecate/change things without the risk of crashing input generation.

The test tests three things for all-ish legacy FileIOCalculators and some other calculators that have commands:

  • Test that we can set the command using envvar
  • Test that we can set the command via keyword
  • Test that we can not set the command and get either a default command or a specific kind of failure

The test was written to pass for a commit before merging the new config stuff, then master was merged into it, and then hacks have been added so as to make the tests pass again. There is a number of compatibility-restoring hacks here and there.

This means the tested behaviours (except in a small set of cases) will be unchanged wrt. legacy behaviour.

Edited by Ask Hjorth Larsen

Merge request reports