{"action":"created","issue":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/321","labels_url":"https://api.github.com/repos/Slicer/Slicer/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/Slicer/Slicer/issues/321/comments","events_url":"https://api.github.com/repos/Slicer/Slicer/issues/321/events","html_url":"https://github.com/Slicer/Slicer/pull/321","id":100854939,"number":321,"title":"BUG: Fix running self tests for scripted modules generated by Extension Wizard","user":{"login":"msmolens","id":7122091,"avatar_url":"https://avatars.githubusercontent.com/u/7122091?v=3","gravatar_id":"","url":"https://api.github.com/users/msmolens","html_url":"https://github.com/msmolens","followers_url":"https://api.github.com/users/msmolens/followers","following_url":"https://api.github.com/users/msmolens/following{/other_user}","gists_url":"https://api.github.com/users/msmolens/gists{/gist_id}","starred_url":"https://api.github.com/users/msmolens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmolens/subscriptions","organizations_url":"https://api.github.com/users/msmolens/orgs","repos_url":"https://api.github.com/users/msmolens/repos","events_url":"https://api.github.com/users/msmolens/events{/privacy}","received_events_url":"https://api.github.com/users/msmolens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-13T19:56:02Z","updated_at":"2015-08-13T22:11:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Slicer/Slicer/pulls/321","html_url":"https://github.com/Slicer/Slicer/pull/321","diff_url":"https://github.com/Slicer/Slicer/pull/321.diff","patch_url":"https://github.com/Slicer/Slicer/pull/321.patch"},"body":"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:\r\n\r\n    NameError: name 'SurfaceToolboxTest' is not defined\r\n\r\nThe affected modules are those that inherit from `ScriptedLoadableModule`. That includes all modules generated by Extension Wizard; see the [template](https://github.com/Slicer/Slicer/blob/master/Utilities/Templates/Modules/Scripted/TemplateKey.py).\r\n\r\nThis commit fixes how `ScriptedLoadableModule` finds and instantiates the self test.\r\n\r\nAdditionally, for consistency with the above change, this commit changes how `ScriptedLoadableModuleWidget` runs the self test when the user clicks \"Reload and Test\".\r\n\r\nThis error was also noted [here](https://github.com/Slicer/Slicer/pull/164#issuecomment-52069238) and [here](https://github.com/Slicer/Slicer/commit/671595bbdaddb90ad2772bcff96686466126da4e#commitcomment-7374819). @naucoin, can you check this?"},"comment":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/comments/130863363","html_url":"https://github.com/Slicer/Slicer/pull/321#issuecomment-130863363","issue_url":"https://api.github.com/repos/Slicer/Slicer/issues/321","id":130863363,"user":{"login":"naucoin","id":289054,"avatar_url":"https://avatars.githubusercontent.com/u/289054?v=3","gravatar_id":"","url":"https://api.github.com/users/naucoin","html_url":"https://github.com/naucoin","followers_url":"https://api.github.com/users/naucoin/followers","following_url":"https://api.github.com/users/naucoin/following{/other_user}","gists_url":"https://api.github.com/users/naucoin/gists{/gist_id}","starred_url":"https://api.github.com/users/naucoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naucoin/subscriptions","organizations_url":"https://api.github.com/users/naucoin/orgs","repos_url":"https://api.github.com/users/naucoin/repos","events_url":"https://api.github.com/users/naucoin/events{/privacy}","received_events_url":"https://api.github.com/users/naucoin/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T22:11:07Z","updated_at":"2015-08-13T22:11:07Z","body":"I checked the color scalar bar test as well as the surface tool box one and one from the Reporting extension - all work with this change, thanks! \r\nThis is ready to merge."}}