[py-dev] jython and py.test code interaction

holger krekel holger at merlinux.eu
Tue Sep 8 00:51:00 CEST 2009


On Mon, Sep 07, 2009 at 14:09 -0500, Benjamin Peterson wrote:
> 2009/9/7 Frank Wierzbicki <fwierzbicki at gmail.com>:
> > On Mon, Sep 7, 2009 at 1:30 PM, Benjamin Peterson<benjamin at python.org> wrote:
> >> 2009/9/7 Frank Wierzbicki <fwierzbicki at gmail.com>:
> >>> On Mon, Sep 7, 2009 at 8:38 AM, holger krekel<holger at merlinux.eu> wrote:
> >>>> * assert re-interpretation: no clue how this could work yet.
> >>> What is assert re-interpretation?
> >>
> >> When an assert statement fails, py.test tries to provide more
> >> debugging information. It does this by walking over the AST of the
> >> assert statement and reinterpreting each part to determine where
> >> exactly it fails.
> >>
> >> I'm not sure why this wouldn't work on Jython except that my
> >> implementation uses the ast module, which is not found in Python 2.5.
> > We actually put the ast.py in our 2.5 -- but it does have a few
> > incompatibilities (for example, we don't currently allow arbitrary
> > python objects in attributes -- we attempt to convert them
> > immediately)
> 
> Well, assertion reinterpretation shouldn't need to do that, so I'm not
> sure why it doesn't work.

hum, i wouldn't bet that it doesn't work, actually - there
were a number of failures in the (py/code) tests and i 
just *presumed* it wouldn't work.   Maybe it works with 
the now fixed trunk.  need to check that. 

best,
holger



More information about the Pytest-dev mailing list