mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
10 stars 6 forks source link

Spectrum Viewer: Improve Testing of Stack and Unit Mode Change #2213

Closed JackEAllen closed 1 week ago

JackEAllen commented 1 month ago

Desired Behaviour

A bug was recently found in the spectrum viewer where tof_mode was not set correctly on initialisation when opening with a new dataset which included a spectra file (SEE PR: #2212) Tests did not fail meaning this bug was only found by chance during usage.

We should add some more tests surrounding swapping sample stacks and unit modes where the sample being switched too and from may or may not have a spectra log file loaded.

Example tests we should add:

Current Behaviour

There are no tests to check swapping between samples and/or unit modes.

samtygier-stfc commented 1 week ago

Once #2239 is merged I am happy that we have enough type checking to be confident that the TOF mode should never get set to None.