Skip to content

New python test scripts for workflow elements

Raza, Zamaan requested to merge python_tests into develop

In this merge request, I have introduced 4 new tests:

  1. TestPeakFinder.py: this is to some extent redundant, but is a necessary part of testing the new workflow. Tests that the peak finder gets the right number of peaks.
  2. TestAutoIndexer.py: checks the indexing part of the workflow, specifically the correctness of the unit cell found.
  3. TestExperimentFileIO.py: Tests the ExperimentImporter and ExperimentExporter classes by loading a HDF5 file, saving it, reloading and checking that the saved elements (PeakCollections, UnitCells and DataSets) are the same.
  4. TestPrediction.py: Checks that the size of the shape library and number of predicted peaks are the same. Note that the data set is very small, and therefore unphysical. I recommend that this is tested more rigorously using a full data set.\

These tests use the unittest module of python, but play well with ctest, since the individual tests can be invoked using ctest -R TestPrediction.py for example, in the build directory.

The datafiles for these tests from the FutA data set are in both .tiff format and intermediate HDF5 (*.nsx). They are stored in test/python/data.

Edited by Raza, Zamaan

Merge request reports