[pypy-dev] Re: [pypy-sprint] sprint quickly approaching

holger krekel hpk at trillke.net
Tue May 25 01:33:30 CEST 2004


Hi all, 

[Armin Rigo Mon, May 24, 2004 at 09:02:42PM +0100]
> There are a lot of areas to work on too.  For example writing docs, the trace
> object space, writing docs, more debugging support (kill these huge
> tracebacks!), porting the tests to 'std.utest' (I'll let Holger introduce this
> one to pypy-dev), organizing docs, cleaning up the wiki and replacing it with
> ReST docs ...

Here we go.  The basic means of doing tests in 'std.utest' is the
assert statement.  So instead of e.g.

    self.assertEquals(x,y) 
   
one does

    assert x == y

and you will see nice output in case of a failure, i.e. the
values of x and y. 

Porting interpreter-level tests should obviously be fairly easy 
and increase readability quite a bit especially as statements  
like 'assert isinstance(x, Y)' also print nicely. 

However, application levels tests are a different story that 
need more consideration.  Under the hood, std.utest deploys
a mini-interpreter to 'reinterpret' the expression from the
assert statement.  It's probably a nice exercise to rewrite 
this mini-interpreter to use an objectspace to extract 
and compute values. 

I think the conversion of the tests is a nice sprint task 
but should probably happen on a branch for some time 
to not disrupt testing for the other participants. 

There are also some other details of pypy's current 
way of doing tests to consider but nothing crucial 
as far as see.

cheers,

    holger


More information about the Pypy-dev mailing list