Skip to content

Increased test coverage

Reese Daniel requested to merge mwe into dev

As of 4e66ef64, the reported coverage is 85.1%, though it's still a mixture of simple execution and actual quantitative tests. I'm satisfied that this is good enough to merge so I can press on with other changes (which will make it easier to increase test coverage and quality). I'll merge in a few days unless someone objects.

The main thing is that the tests now mostly cover the main end-user operations of write_grid and fit_data.

Here are a few contributors to the last 14.9%.

  • There's about 55 lines (~2.0%) in blocks ending with sys.exit. I think pytest can somehow handle these but I'm more inclined to wait until they've been changed to raise the appropriate exceptions (#9 (closed)).
  • AIMS.finds_weight_new fails because it tries to call AIMS_configure.find_weights, which doesn't exist.
  • The basic sampling run doesn't use a surface effect so doesn't reach some different cases for that control in AIMS.py. I'm not especially worried because we do test some other surface effect options elsewhere.
  • There's about 27 lines (~1.0%) that use the parallel-tempered sampler, which I don't reach because I'm using emcee 3. There's also the 23 lines of AIMS.run_emcee that I don't test because the ensemble sampler's keyword argument syntax has changed but I wouldn't reach all of it without the parallel-tempered sampler anyway. I plan to look into upgrading emcee support to v3+ without losing the parallel-tempered sampler.

Merge request reports

Loading