Prabhu Ramachandran | 22 Jul 04:20

Re: Overview of ETS 3.0 tests

Ilan Schnell wrote:
> Hi Prabhu,
> can you take a look at revison 20153.  I don't know why it is
> failing when invoked via python setup.py test:
> Traceback (most recent call last):
>   File
> "/home/ischnell/ets/ETS_3.0.0b1/Mayavi_3.0.0a1/enthought/mayavi/tests/test_pipeline_info.py",
> line 24, in test_tvtk_dataset_name
>     datasets = [tvtk.ImageData(),
>   File "tvtk_classes/image_data.py", line 32, in __init__
>     tvtk_base.TVTKBase.__init__(self, vtk.vtkImageData, obj, update,
> **traits)
> TypeError: unbound method __init__() must be called with TVTKBase
> instance as first argument (got ImageData instance instead)
> 
> However, from enthought.tvtk.api import tvtk work, but then something
> goes wrong.

Well, I have no idea.  I was getting these when I ran nosetests 
enthought/mayavi/tests enthought/tvtk/tests
and combinations of the above.  However, this is completely 
non-reproducible.  Right now, with python setup.py test, everything 
except one test passes -- here is the output:

[...]
ok
Failure: ImportError (No module named test_support) ... ERROR
Is the default PipelineInfo class built right. ... ok
test_tvtk_dataset_name 
(enthought.mayavi.tests.test_pipeline_info.TestPipelineInfoTest) ... ok

======================================================================
ERROR: Failure: ImportError (No module named test_support)
----------------------------------------------------------------------
Traceback (most recent call last):
   File

"/home/prabhu/usr/virtualenv/ets_trunk/lib/python2.5/site-packages/nose-0.10.3-py2.5.egg/nose/loader.py", 
line 364, in loadTestsFromName
     addr.filename, addr.module)
   File

"/home/prabhu/usr/virtualenv/ets_trunk/lib/python2.5/site-packages/nose-0.10.3-py2.5.egg/nose/importer.py", 
line 39, in importFromPath
     return self.importFromDir(dir_path, fqname)
   File

"/home/prabhu/usr/virtualenv/ets_trunk/lib/python2.5/site-packages/nose-0.10.3-py2.5.egg/nose/importer.py", 
line 84, in importFromDir
     mod = load_module(part_fqname, fh, filename, desc)
   File

"/skratch/prabhu/svn/enthought/Mayavi_3.0.0a1/Mayavi_3.0.0a1/enthought/mayavi/tests/test_csv_sniff.py", 
line 11, in <module>
     from test.test_support import TESTFN, TestFailed
ImportError: No module named test_support

----------------------------------------------------------------------
Ran 92 tests in 29.038s
FAILED (errors=1)

That looks like a problem with test_csv_sniff.  Otherwise everything 
else runs.  Weird.  Now running nosetests also works with just this one 
error.  However, if I do this:

$ nosetests enthought/tvtk/tests enthought/mayavi/tests

I get this:

[...]
Ran 184 tests in 35.844s

FAILED (errors=36, failures=2)

With the errors you have reported.  My guess is either the TVTKBase 
class is reloaded or the tvtk_classes.zip file is reloaded (since the 
zip file is added to the path)  and this causes the problem with 
"unbound method __init__() must be called with TVTKBase instance as 
first argument".

cheers,
prabhu

Gmane