2012/4/28 Timo Paulssen <t...@wakelift.de>:
> Hello there,
>
> I was writing a few test cases for numpypy to make sure it behaves like
> numpy does when confronted with objects that have either an __int__, an
> __index__ or both (rule of thumb: index is prefered, but int is accepted in
> absence of index).
>
> Now, I wrote six tests that use three custom objects (one set for getitem,
> one set for setitem and one test each for int only, int and index and index
> only).
>
> I couldn't put those classes outside the applevel test (this is about
> pypy/module/micronumpy/test/test_numarray.py btw) because there's some kind
> of separation going on there. I *thought* the way to do it was to put it
> inside the applevel test class and have its name start with w_, but that
> wasn't it either.

Yes, this only works for functions. You probably want to use
space.appexec in setup_class().


-- 
Regards,
Benjamin
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to