Jython/Python Libs

John Roth johnroth at ameritech.net
Tue Jan 7 18:06:47 EST 2003


"Ype Kingma" <ykingma at accessforall.nl> wrote in message
news:3e1b2914$0$147$e4fe514c at dreader7.news.xs4all.nl...
>
> Terry Hancock wrote:
>
> > Hi all,
> > I need to survey what modules are supported in both Jython and
Python
> > (which is probably nearly the same as knowing which modules have no
> > dependencies on C extensions).  What would be the quickest way to
> > establish
> > that?  (As in, is there a way to import and test them all
automatically
> > and report the failures, or has someone already tabulated this
somewhere).
> >
> > Ideally I'd also catch the few cases of modules which don't work
correctly
> > for language compatibility regions, but I know that can be pretty
subtle.
> >
> > I'm really only interested in the standard library modules -- I'll
test
> > any extra modules we need case-by-case anyway.
> >
> > The goal is to clearly establish and document what subset of Python
will
> > run on either platform.
>
> You can use python libs available from the CPython installation
> by extending the Jython path with the CPython library path, so Jython
will
> load it's own libraries before looking for the CPython ones.
>
> Then have Jython run the tests that come with the standard CPython
> installation.
>
> I tried this a few years ago when I started using Jython, and I have
> forgotten the details. The biggest problem was locating the main test
> module, ie. the one that invokes all the tests. I'm not even sure
> that these tests are still distributed with CPython.

Lib/test/regrtest.py

It's in my Python 2.3a1 installation, so I presume it's current.

John Roth

>
> I do remember being surprised at how many tests actually passed
> then. In case you can repeat this exercise I'd like to know the
> results.
>
>
> Have fun,
> Ype
>
> --
> email at xs4all.nl






More information about the Python-list mailing list