Stefan Behnel added the comment:

I understand that this is not trivial to test as part of the regression test 
suite. However, when I try it now I get this:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "__init__.py", line 8, in init my_test_package 
(my_test_package/__init__.c:1032)
SystemError: Parent module 'my_test_package' not loaded, cannot perform 
relative import

This is running Cython's "initial_file_path" test, which is meant to check that 
we provide a fake __path__ for the package module for the init function (as 
long as issue13429 isn't resolved).

The test code is here, failing in line 21 (each section is a separate file):

https://github.com/cython/cython/blob/master/tests/run/initial_file_path.srctree

I'm running the test like this:

python3 runtests.py --no-cpp --no-pyregr --no-unit --debug -vv initial_file_path

I also let it print sys.modules and the package isn't registered there yet at 
the time of the import.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to