Brett Cannon added the comment:

This test example is nonsensical. You are directly executing a package which 
leads to pkg/tests being put in sys.path first. That means you end up with http 
in pkg/tests masking the one in the stdlib, which causes your ``from 
http.clients import HTTPConnection`` to fail. You should be using the -m option 
with a proper __main__.py file to avoid this. If you do that with a __main__.py 
file doing nothing more than ``from pkg import tests`` everything works.

----------
resolution:  -> rejected
status: open -> closed

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

Reply via email to