enthought / ensemble

High-level widgets for building Python applications
Other
4 stars 7 forks source link

[WIP] Fix/travis failure #40

Closed itziakos closed 9 years ago

pberkes commented 9 years ago

@itziakos @jwiggins Any lead on why the tests might be failing? I'd like to give a hand to see this issue fixed ASAP.

At the moment there are two kind of problems:

1) errors that do not break the tests and that look like this:

test_renderer_clipping_bounds (ensemble.volren.tests.test_volume_renderer.VolumeViewerTestCase) ... ERROR: In /build/buildd/vtk-5.8.0/VolumeRendering/vtkOpenGLVolumeTextureMapper3D.cxx, line 102
vtkOpenGLVolumeTextureMapper3D (0x78474c0): required extensions not supported
ERROR: In /build/buildd/vtk-5.8.0/VolumeRendering/vtkOpenGLVolumeTextureMapper3D.cxx, line 102
vtkOpenGLVolumeTextureMapper3D (0x78474c0): required extensions not supported
ERROR: In /build/buildd/vtk-5.8.0/VolumeRendering/vtkOpenGLVolumeTextureMapper3D.cxx, line 102
vtkOpenGLVolumeTextureMapper3D (0x78474c0): required extensions not supported

2) Errors from enable:

======================================================================
ERROR: test_mouse_drag_alpha (ensemble.ctf.tests.test_editor.TestEditor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/enthought/ensemble/ensemble/ctf/tests/test_editor.py", line 57, in test_mouse_drag_alpha
    window=editor.window)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/enable/testing.py", line 74, in press_move_release
    shift_down=shift_down)
  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/enable/testing.py", line 259, in mouse_move
    window.get_pointer_position.return_value = (x, y)
AttributeError: 'instancemethod' object has no attribute 'return_value'
pberkes commented 9 years ago

Good news: I can reproduce 2) on my machine

pberkes commented 9 years ago

So the errors from 2) are coming from enable and was introduced in https://github.com/enthought/enable/commit/bd86c7c9637ea99e164b39fe5bb407fc96821800 . As it is now, mouse_move assumes that the window is always a mock one (https://github.com/enthought/enable/commit/bd86c7c9637ea99e164b39fe5bb407fc96821800), while we're passing a real window.

The errors can be worked around by using the mock window, i.e., removing window=editor.window in https://github.com/enthought/ensemble/blob/4511335b42821dfd861183707bbf57438da4df31/ensemble/ctf/tests/test_editor.py#L57 and https://github.com/enthought/ensemble/blob/4511335b42821dfd861183707bbf57438da4df31/ensemble/ctf/tests/test_editor.py#L64

OTOH the tests in TestEditor do not check anything, and always pass unless something bad happend just interacting with the window, so maybe having a mock one would make them even more permissive.

jwiggins commented 9 years ago

Looking good now that #43 is in. I'm not sure how y'all feel about the volume renderer test "errors", but they don't really bother me. :+1: @pberkes, @itziakos: Merge when you're satisfied with the state of this branch.

pberkes commented 9 years ago

LGTM