Slicer: 2145-support-for-installing-extension-from-file fc32e163

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2014-01-24 04:03:31 2145-support-for-installing-extension-from-file 0b1b8340
Changeset

BUG: Fix "Reload and Test" function

While commit r22839 re-factored the code associated with "Reload" function,
it also made the "Reload and Test" function fails.

This commit fixes the issue by setting the "<moduleName>" key into
the global dictionary of the reloaded module so that it can be
referenced in the "onReloadAndTest()" function.

Note that the overall approach to reload modules could be revisited to
leverage either the "rollback importer" method or a more sophisticated one
like the "python-reloader" [2][3]

Thanks to "Csaba Pinter <csaba.pinter@queensu.ca>" for reporting the issue.

[1] http://pyunit.sourceforge.net/notes/reloading.html
[2] http://www.indelible.org/ink/python-reloading/
[3] https://github.com/jparise/python-reloader

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

mod - Applications/SlicerApp/Testing/Python/AtlasTests.py Diff File
mod - Applications/SlicerApp/Testing/Python/Charting.py Diff File
mod - Applications/SlicerApp/Testing/Python/FiducialLayoutSwitchBug1914.py Diff File
mod - Applications/SlicerApp/Testing/Python/JRC2013Vis.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNA2012ProstateDemo.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAQuantTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAVisTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/ScenePerformance.py Diff File
mod - Applications/SlicerApp/Testing/Python/SliceLinkLogic.py Diff File
mod - Applications/SlicerApp/Testing/Python/Slicer4Minute.py Diff File
mod - Applications/SlicerApp/Testing/Python/ViewControllersSliceInterpolationBug1926.py Diff File
mod - Applications/SlicerApp/Testing/Python/fiber_visibility_crash2438.py Diff File
mod - Applications/SlicerApp/Testing/Python/labelToggleBug2049.py Diff File
mod - Applications/SlicerApp/Testing/Python/sceneImport2428.py Diff File
mod - Applications/SlicerApp/Testing/Python/slicerCloseCrashBug2590.py Diff File
mod - Applications/SlicerApp/Testing/Python/test_tractography_display.py Diff File
mod - Base/Python/slicer/util.py Diff File
mod - Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate/ScriptedLoadableModuleTemplate.py Diff File
mod - Modules/Loadable/CropVolume/Testing/Python/CropVolumeSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/AddManyMarkupsFiducialTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/MarkupsInCompareViewersSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/NeurosurgicalPlanningTutorialMarkupsSelfTest.py Diff File
mod - Modules/Loadable/VolumeRendering/Testing/Python/VolumeRenderingSceneClose.py Diff File
mod - Modules/Scripted/DataProbe/DataProbe.py Diff File
mod - Modules/Scripted/SurfaceToolbox/SurfaceToolbox.py Diff File