[pypy-dev] unittest-module (was: some pypy-svn checkin)
holger krekel
hpk at trillke.net
Tue Jul 1 21:58:32 MEST 2003
[Michael Hudson Tue, Jul 01, 2003 at 02:29:00PM +0100]
> hpk at codespeak.net writes:
> > Log:
> > - improved the hack to perform specific objspace tests only when
> > actually running the tests with the respective objspace.
> > (i.e. objspace.ann* tests are skipped for StdObjSpace and
> > objspace.std* for AnnObjSpace)
>
> I think *a* way to do this nicely is to have test.objspace() raise a
> "TestSkip" exception when asked for a specific object space that is
> not the one currently being tested.
I agree this is a good way. Also the "shouldStop" stuff would probably
be better implemented by a Control-Flow Exception.
> This probably means rewriting
> more of unittest.py, though (we want four possible outcomes: pass,
> fail, error, skip).
yep, looking at the unittest.py source this probably means overriding
even more methods. To be honest IMO we should make our life easier and
just drag unittest.py from python-2.3, add "skips", remove the
leading "__" from some names plus probably do some other
cleanups/niceties. Doesn't seem like incredibly hard work
and we may offer it back to cpython, later :-)
What do you think?
cheers,
holger
More information about the pypy-dev
mailing list