--- you can reply above this line --- New issue 221: PEP 420 namespace packages https://bitbucket.org/hpk42/pytest/issue/221/pep-420-namespace-packages
Anonymous: It seems that pytest (I'm using 2.3.3) doesn't support PEP 420 style namespace packages. I'm trying to run the tests from XIST 4.4 and get the following results: ``` #!bash $ hg clone https://bitbucket.org/doerwalter/livinglogic.python.xist $ cd livinglogic.python.xist/ $ pip install . $ python -mpytest test/test_misc.py ========================================================================================================================= test session starts ========================================================================================================================= platform darwin -- Python 3.3.0 -- pytest-2.3.3 collected 19 items test/test_misc.py ................... ====================================================================================================================== 19 passed in 0.52 seconds ====================================================================================================================== ``` However if I remove the namespace package __init__.py file: ``` #!bash rm ~/pyvenvs/default/lib/python3.3/site-packages/ll_xist-4.4-py3.3-macosx-10.7-x86_64.egg/ll/__init__.py ``` The output of the test run looks like this: ``` #!bash $ python -mpytest test/test_misc.py ========================================================================================================================= test session starts ========================================================================================================================= platform darwin -- Python 3.3.0 -- pytest-2.3.3 collected 0 items / 1 errors =============================================================================================================================== ERRORS ================================================================================================================================ _________________________________________________________________________________________________________________ ERROR collecting test/test_misc.py __________________________________________________________________________________________________________________ test/test_misc.py:14: in <module> > from ll import misc <frozen importlib._bootstrap>:1558: in _find_and_load > ??? <frozen importlib._bootstrap>:1516: in _find_and_load_unlocked > ??? <frozen importlib._bootstrap>:1470: in _find_module > ??? ../pyvenvs/default/lib/python3.3/site-packages/pytest-2.3.3-py3.3.egg/_pytest/assertion/rewrite.py:66: in find_module > fd, fn, desc = imp.find_module(lastname, path) ../.local/lib/python3.3/imp.py:192: in find_module > "not {}".format(type(name))) E RuntimeError: 'list' must be None or a list, not <class 'str'> ======================================================================================================================= 1 error in 0.05 seconds ======================================================================================================================= ``` However using the package from within Python still works without a problem: ``` #!bash $ python Python 3.3.0 (default, Sep 29 2012, 23:56:05) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from ll import misc >>> misc.gzip(b'foo') b'\x1f\x8b\x08\x00\xb4\xbc\x9bP\x02\xffK\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00' ``` -- This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue. _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev