Since we are not creating tcl tests anymore (at least it seems that way), it would be great to cleanup the python tests and get rid of the tcl-isms. It will also make them more useful and easier to read.<div><br><br><div class="gmail_quote">
On Tue, Mar 12, 2013 at 6:23 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, Mar 12, 2013 at 7:13 AM, Kyle Lutz <<a href="mailto:kyle.lutz@kitware.com">kyle.lutz@kitware.com</a>> wrote:<br>
> On Tue, Mar 12, 2013 at 3:39 AM, Andrew Maclean<br>
> <<a href="mailto:andrew.amaclean@gmail.com">andrew.amaclean@gmail.com</a>> wrote:<br>
>> OK ... I deleted the build directory and ran CMake again and things are much<br>
>> improved. See: <a href="http://open.cdash.org/viewTest.php?onlyfailed&buildid=2843128" target="_blank">http://open.cdash.org/viewTest.php?onlyfailed&buildid=2843128</a><br>
>><br>
>> However:<br>
>> vtkpython TestProjectedTerrainPath.py<br>
>> Traceback (most recent call last):<br>
>>   File "TestProjectedTerrainPath.py", line 15, in <module><br>
>>     lo = lindex(demReader.GetOutput().GetScalarRange(),0)<br>
>> NameError: name 'lindex' is not defined<br>
>><br>
>> yet:<br>
>><br>
>> ctest -R TestProjectedTerrainPath<br>
>> Test project /home/amaclean/Code/Kitware/build/VTK<br>
>>     Start 674: vtkFiltersHybridPython-TestProjectedTerrainPath<br>
>> 1/2 Test #674: vtkFiltersHybridPython-TestProjectedTerrainPath ...   Passed<br>
>> 2.24 sec<br>
>>     Start 693: vtkFiltersHybridTcl-TestProjectedTerrainPath<br>
>> 2/2 Test #693: vtkFiltersHybridTcl-TestProjectedTerrainPath ......   Passed<br>
>> 1.69 sec<br>
>><br>
>> 100% tests passed, 0 tests failed out of 2<br>
>><br>
>> Could someone please point me to an explanation as to why ctest works, I<br>
>> would have expected a fail at line 15 because of lindex(). My concern here<br>
>> is that if it is Python code you would reasonably expect just Python code<br>
>> lindex() is certainly not that.<br>
>> I don't understand how these Python equivalents of the Tcl names are being<br>
>> brought in by CTest.<br>
><br>
> Hi Andrew,<br>
><br>
> Most (all?) of the converted TCL scripts are run through the<br>
> rtImageTest.py driver which defines a few functions/variables (one of<br>
> which is lindex).<br>
><br>
> If you run "ctest -R vtkFiltersHybridPython-TestProjectedTerrainPath<br>
> -V -N" you can see the command line that ctest uses on the line that<br>
> starts with "Test command:". Running that entire command should give<br>
> you the same results as running the test with ctest.<br>
><br>
> -kyle<br>
<br>
</div></div>I'm not a fan of all the "tcl-isms" in the python tests, myself.  The<br>
vtkTclTestToPy converter that was used for most test generates<br>
python code that is barely legible.  We have another converter,<br>
tcl2py.py, which isn't quite as powerful but which produces much<br>
nicer output.<br>
<span class="HOEnZb"><font color="#888888"><br>
 - David<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>