Skip to content

BUG: Fix running self tests for scripted modules generated by Extension Wizard

Created by: msmolens

An error occurs when running the self tests for certain scripted modules through the SelfTests module GUI. For example, running the SurfaceToolbox self test results in:

NameError: name 'SurfaceToolboxTest' is not defined

The affected modules are those that inherit from ScriptedLoadableModule. That includes all modules generated by Extension Wizard; see the template.

This commit fixes how ScriptedLoadableModule finds and instantiates the self test.

Additionally, for consistency with the above change, this commit changes how ScriptedLoadableModuleWidget runs the self test when the user clicks "Reload and Test".

This error was also noted here and here. @naucoin, can you check this?

Merge request reports

Loading