[py-dev] Odd import issue with tests for compatibility modules.

David Stanek dstanek at dstanek.com
Fri Jun 17 14:23:08 CEST 2005


>
> I have checked in some help for getting this to work (see the
> commit message).  Generally, it's a bit messy because and we
> may want to modify the tests some more to not use test_support for
> example but i don't know yet.

Thanks! I'll check it out today. Actually test_support uses unittest and
doctest to execute the module's tests. Once doctest support is included in
py.test I won't have to use test_support anymore for the doctests. Further
down the line, once unittest support is included, well you can see where I
am going. The test_support will no longer be needed...

>
> The immediate problem is a different one, as one can't
> currently do
>
>     from py.compat.doctest import *
>
> which - i think - you pointed out earlier already.  For this
> the initpkg() function in initpkg.py needs to be enhanced
> or special-cased, i guess.
>

I have a patch for this that I am currently working on. I have to write a
couple more tests to cover all the various ways you can import things into
a namespace.

David




More information about the Pytest-dev mailing list