Import 2017-06-07 23:51:09: master c3993e57

Author Committer Branch Timestamp Parent
msmolens msmolens master 2015-08-13 18:21:47 master 968cf935
Changeset

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

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 the ScriptedLoadableModuleWidget runs the self test when the user
clicks "Reload and Test".

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24498 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Base/Python/slicer/ScriptedLoadableModule.py Diff File