[vtk-developers] Possible issue with the VTK Master

Bill Lorensen bill.lorensen at gmail.com
Tue Mar 12 12:13:18 EDT 2013


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.


On Tue, Mar 12, 2013 at 6:23 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> On Tue, Mar 12, 2013 at 7:13 AM, Kyle Lutz <kyle.lutz at kitware.com> wrote:
> > On Tue, Mar 12, 2013 at 3:39 AM, Andrew Maclean
> > <andrew.amaclean at gmail.com> wrote:
> >> OK ... I deleted the build directory and ran CMake again and things are
> much
> >> improved. See:
> http://open.cdash.org/viewTest.php?onlyfailed&buildid=2843128
> >>
> >> However:
> >> vtkpython TestProjectedTerrainPath.py
> >> Traceback (most recent call last):
> >>   File "TestProjectedTerrainPath.py", line 15, in <module>
> >>     lo = lindex(demReader.GetOutput().GetScalarRange(),0)
> >> NameError: name 'lindex' is not defined
> >>
> >> yet:
> >>
> >> ctest -R TestProjectedTerrainPath
> >> Test project /home/amaclean/Code/Kitware/build/VTK
> >>     Start 674: vtkFiltersHybridPython-TestProjectedTerrainPath
> >> 1/2 Test #674: vtkFiltersHybridPython-TestProjectedTerrainPath ...
> Passed
> >> 2.24 sec
> >>     Start 693: vtkFiltersHybridTcl-TestProjectedTerrainPath
> >> 2/2 Test #693: vtkFiltersHybridTcl-TestProjectedTerrainPath ......
> Passed
> >> 1.69 sec
> >>
> >> 100% tests passed, 0 tests failed out of 2
> >>
> >> Could someone please point me to an explanation as to why ctest works, I
> >> would have expected a fail at line 15 because of lindex(). My concern
> here
> >> is that if it is Python code you would reasonably expect just Python
> code
> >> lindex() is certainly not that.
> >> I don't understand how these Python equivalents of the Tcl names are
> being
> >> brought in by CTest.
> >
> > Hi Andrew,
> >
> > Most (all?) of the converted TCL scripts are run through the
> > rtImageTest.py driver which defines a few functions/variables (one of
> > which is lindex).
> >
> > If you run "ctest -R vtkFiltersHybridPython-TestProjectedTerrainPath
> > -V -N" you can see the command line that ctest uses on the line that
> > starts with "Test command:". Running that entire command should give
> > you the same results as running the test with ctest.
> >
> > -kyle
>
> I'm not a fan of all the "tcl-isms" in the python tests, myself.  The
> vtkTclTestToPy converter that was used for most test generates
> python code that is barely legible.  We have another converter,
> tcl2py.py, which isn't quite as powerful but which produces much
> nicer output.
>
>  - David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130312/83621c46/attachment.html>


More information about the vtk-developers mailing list