Gael Varoquaux | 6 Sep 19:52
Favicon
Gravatar

Re: Mayavi: testing: good news

On Sat, Sep 06, 2008 at 10:31:55PM +0530, Prabhu Ramachandran wrote:
> In the past I was complaining that it was hard to write tests for mayavi 
> because it needs the UI.  Well, thats not true anymore.  I've made a 
> small change to the pipeline_base.py code that allows us to create/run 
> tests without creating any user interface or a UI or even using 
> offscreen rendering.  This means we can write non-interactive tests for 
> the core mayavi.

Very cool. This is indeed a "big deal", as your commit message mentions
it.

I had a quick go at checking out if I could modify mlab to
work in such a "null backend" mode. I think it might be possible. Right
now what seems to be that engine.add_source creates a scene.

Here is what I propose: have an option to turn on this null backend
behavior. In this mode, the code base would follow the pattern that you
have started to create object on the pipeline, but not really turn them
live. This would allow us to test a fair amount of the scripting layer of
mayavi, with or without mlab. A good fraction of our examples could then
run non-interactively, and thus be easier to test. We could also easily
write a fair amount of tests.

Does this sound feasible, or am I missing something?

Gaƫl

Gmane