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 file to avoid this. If you do that with a 
file doing nothing more than ``from pkg import tests`` everything works.

resolution:  -> rejected
status: open -> closed

Python tracker <>
Python-bugs-list mailing list

Reply via email to