[vtk-developers] Update: Making Tests Python 3/2 compatible.

Andrew Maclean andrew.amaclean at gmail.com
Mon Aug 10 05:00:20 EDT 2015


So far so good,(2to3 has been very helpful).
---------------------------------------------------------------
98% tests passed, 12 tests failed out of 489

Total Test time (real) = 1046.22 sec

The following tests FAILED:
        655 - vtkFiltersGeneralPython-TestMultiBlockStreamer (Failed)
        676 - vtkFiltersGeneralPython-splitVectors (Failed)
        677 - vtkFiltersGeneralPython-streamTracer (Failed)
        1263 - vtkIONetCDFPython-NetCDFCF2DBounds (Failed)
        1264 - vtkIONetCDFPython-NetCDFCFSetOutputType (Failed)
        1265 - vtkIONetCDFPython-NetCDFCFSphericalCoords (Failed)
        1266 - vtkIONetCDFPython-NetCDFCFUnstructured (Failed)
        1267 - vtkIONetCDFPython-NetCDFReader (Failed)
        1935 - vtkRenderingTkPython-cursor3D (Failed)
        1936 - vtkRenderingTkPython-TestTextActor3D (Failed)
        1937 - vtkRenderingTkPythvtkIONetCDFPythonon-TestTkRenderWidget
(Failed)
        1938 - vtkRenderingTkPython-TestTkRenderWindowInteractor (Failed)

See: https://gitlab.kitware.com/vtk/vtk/merge_requests/514#note_26500
currently marked as WIP.
---------------------------------------------------------------

David, one interesting thing that I am seeing is that the above
vtkFiltersGeneralPython and vtkIONetCDFPython tests that fail actually pass
in Python 2 but the image generated is different in Python 3. Could there
some slight difference in the wrapping e.g the treatment of floats or ints?

I may be able to get the vtkIONetCDFPython working. I suspect cursor3D.py
may now be Ok.

Once I fix errors in vtkRenderingTkPython I will remove the WIP:
appellation.


Regards
   Andrew


On Sun, Aug 9, 2015 at 11:50 AM, Andrew Maclean <andrew.amaclean at gmail.com>
wrote:

> Thanks for that.
> I rebased against the master and picked up those changes.
>
> Andrew
>
> On Sat, Aug 8, 2015 at 10:48 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
>
>> Wow, I didn't expect so many of the tests to be passing so soon. Thanks
>> for looking into these so quickly!
>>
>> I just merged some fixes to my own 2 to 3 changes for
>> Common/Core/Testing/Python and Wrapping/Python/vtk.  These are mainly fixes
>> to "print" calls that I'd been lazy with the first time.
>>
>> So please rebase either onto the current master or onto this commit:
>> https://gitlab.kitware.com/dgobbi/vtk/commit/26ad0555
>>
>> Cheers,
>>
>>  - David
>>
>> On Fri, Aug 7, 2015 at 10:51 PM, Andrew Maclean <
>> andrew.amaclean at gmail.com> wrote:
>>
>>> David you have done a fantastic job!
>>>
>>>
>>> Just letting you know that by making python 3 changes to rtImageTest.py,
>>> info.py, catch.py and expr.py,
>>>
>>> I am now getting 89% tests passed, 54 tests failed out of 481!
>>>
>>> In rtImageTest.py, Tkinter is now tkinter in Python 3.
>>> For handling renamed libraries is code like this acceptable (it works in
>>> Python 2 and 3):
>>> ##################
>>> try:
>>>     # for Python2
>>>     print('Trying Python2')
>>>     import Tkinter as tk
>>>     print('Python2 Ok')
>>> except ImportError:
>>>     # for Python3
>>>     print('Trying Python3')
>>>     import tkinter as tk
>>>     print('Python3 Ok')
>>> pythonTk = tk.Tk()
>>> ##################
>>>
>>> The remaining failing tests are mainly related to the print statement,
>>> failures relating to string.find [in vtkMethodParser.py], no module named
>>> exceptions etc.
>>>
>>> I need to do some thorough testing on  rtImageTest.py, info.py,
>>> catch.py, expr.py, vtkMethodParser.py for both Python 2.7 and Python 3.4
>>>
>>> I am so impressed that these few changes have worked.
>>>
>>> I'll try and get all the tests passing for Python 2 and Python 3 in the
>>> next week or so and create a merge request for review.
>>>
>>> Regards
>>>     Andrew
>>>
>>>
>>> --
>>> ___________________________________________
>>> Andrew J. P. Maclean
>>>
>>> ___________________________________________
>>>
>>
>>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150810/764ac3ad/attachment.html>


More information about the vtk-developers mailing list