This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, djc, ncoghlan
Date 2012-11-28.17:21:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354123306.15.0.87527570121.issue16570@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-11-28 17:21:46brett.cannonsetrecipients: + brett.cannon, ncoghlan, djc
2012-11-28 17:21:46brett.cannonsetmessageid: <1354123306.15.0.87527570121.issue16570@psf.upfronthosting.co.za>
2012-11-28 17:21:46brett.cannonlinkissue16570 messages
2012-11-28 17:21:45brett.cannoncreate