[TransWarp] Re: TransWarp

Phillip J. Eby pje at telecommunity.com
Wed Jul 11 07:19:22 EDT 2001


At 01:02 AM 7/11/01 -0500, Daniel Mahler wrote:

>I have started playing with TransWarp.
>I have found the following issues
>
>The REAME says
>
>  TESTING YOUR INSTALLATION
>
>   TransWarp comes with a fairly hefty built-in test suite.  If you have
>   the Python "unittest" module installed in your Python path, you can use
>   it to run the test suites, like this::
>
>    python unittest.py TW.tests.suite
>
>   This will run about 114 tests on various parts of TransWarp.  If you have
>   installed everything correctly, 100% of the tests should succeed.  If
>   you're missing any needed parts, you will probably experience a massive
>   number of failures and errors.
>
>The number is right, but I do get one failure:
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>checkNothing (TW.tests.StructuralModel._Aspects.Raw) ...
> 
>======================================================================
>         ERROR
> 
>----------------------------------------------------------------------
>         Traceback (most recent call last):
>           File "TW/tests/StructuralModel/_Aspects.py", line 10, in setUp
>             g = (MetaModel + Structure + Storage + Misc + ModelQuerying + 
> XMIReading + Representation)(module=__name__)

...

>             return classobj(name,bases,dict)
>         TypeError: class() argument 1 must be string, not unicode

Interesting.  Looks like the XML libraries on 2.1 return unicode objects 
for text.  I suppose to properly support 2.1 I'll need to review all the 
places where I use strings from XML files.


>I find that I have to run the Tests using
>
>python $PYLIB/unittest.py TW.tests.suite
>
>rather than just
>
>python unittest.py TW.tests.suite
>
>even though $PYLIB is in my $PYTHONPATH

Ah.  The instructions were meant to imply that you run unittest.py from 
wherever it is.  Perhaps someone can suggest a better phrasing.  Still, 
it's nice to know that all but one of the unit tests in the preview release 
work on Python 2.1.  Perhaps after I hunt down and fix the unicode issues, 
you'd like to try the CVS version and see how well it works?  It does quite 
a bit more with XML than the preview release does.





More information about the PEAK mailing list