[pypy-dev] test_all.py can't recognize has multi inherited classes

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Fri Feb 15 08:34:25 CET 2013


Hi James,


Interesting find,

i can replicate and i don't yet see how it happens,
because the code pytest uses does walk the mro to find tests in parent 
classes

i will report back once i figured whats wrong

-- Ronny


On 02/15/2013 08:14 AM, James Lan wrote:
> Hi All,
>
> I tried to run test cases for jvm backend by the following command,
>
>
>      pypy pypy/test_all.py rpython/translator/jvm/test
>
>
> but what I got was 10 tests defined in
> rpython/translator/jvm/test/test_backendopt.py although there are two
> dozens of test files in that directory.
>
> After experiment, I found that it failed to collect test within a multi
> inherited class. Take test_constant.py as an example, it defines a class,
>
>
>      class TestConstant(BaseTestConstant, JvmTest):
>          pass
>
>
> and JvmTest is defined as,
>
>
>      class JvmTest(BaseRtypingTest, OORtypeMixin):
>          ......
>
>
> When I executed the folloing,
>
>
>      ypy pypy/test_all.py rpython/translator/jvm/test/test_constant.py
> --collectonly
>
>
> it reported 0 item was collected. If I remove BaseTestConstant from
> TestConstant's super classes, it still reports 0 item collected; but if
> I remove JvmTest from its super classes, it reports 18 items are collected.
>
>
> I'm wondering how the daily test solve this problem?
>
> Thanks,
> James Lan
>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev



More information about the pypy-dev mailing list