View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003201 | Slicer4 | Core: Extensions | public | 2013-07-01 07:34 | 2014-03-07 10:22 |
Reporter | jcfr | Assigned To | jcfr | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | acknowledged | Resolution | open | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0003201: Improve support of selftest within slicer_add_python_unittest | ||||
Description | Discussion: http://slicer-devel.65872.n3.nabble.com/Writing-unit-tests-for-module-widgets-tp4029167p4029262.html // --------------------- I'm now trying to test my extension using the "make Experimental" target from these instructions. However, my test now fails when trying to access my module's widget in the following code: m = slicer.util.mainWindow() The selectModule() call doesn't seem to have an effect. Looking closer at the console output during the test, the number of modules loaded into Slicer is 1 fewer than usual; this indicates to me that my module isn't actually being loaded into Slicer during this unit test. How can I get my module to be correctly loaded into Slicer during a unit test with 'make Experimental'? // --------------------- slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py SLICER_ARGS "--additional-module-path" "${CMAKE_CURRENT_LIST_DIR}") This isn't a perfect fix, since it doesn't take into account other possible modules in the extension that might need to be loaded as well. This issue might be worth more consideration later, since writing tests which use the module's GUI is very useful. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-01 07:34 | jcfr | New Issue | |
2013-07-01 07:34 | jcfr | Status | new => assigned |
2013-07-01 07:34 | jcfr | Assigned To | => jcfr |
2013-07-01 07:34 | jcfr | Assigned To | jcfr => |
2014-03-06 08:48 | nicole | Status | assigned => new |
2014-03-06 09:19 | jcfr | Status | new => assigned |
2014-03-06 09:19 | jcfr | Assigned To | => jcfr |
2014-03-07 10:22 | jcfr | Status | assigned => acknowledged |
2014-03-07 10:22 | jcfr | Description Updated |