Message176556
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. |
|
Date |
User |
Action |
Args |
2012-11-28 17:21:46 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, djc |
2012-11-28 17:21:46 | brett.cannon | set | messageid: <1354123306.15.0.87527570121.issue16570@psf.upfronthosting.co.za> |
2012-11-28 17:21:46 | brett.cannon | link | issue16570 messages |
2012-11-28 17:21:45 | brett.cannon | create | |
|