Message321761
This is still broken, IMHO. Either we should rename test.bisect or we should remove all of the 'if __name__ == "__main__"' part of the test scripts. You can't run the tests reliably as scripts anymore. Doing so puts Lib/test into sys.path. Then, anything that imports 'bisect' (e.g. the random module) will get test.bisect and not the real bisect module.
I tried making it so that test.bisect could not be imported as bisect but I can't think of a way. E.g. adding to test/__init__.py
import test._bisect as bisect
sys.modules['test.bisect'] = bisect
does not work. I don't understand the import system good enough to think of a solution. |
|
Date |
User |
Action |
Args |
2018-07-16 19:41:58 | nascheme | set | recipients:
+ nascheme, vstinner |
2018-07-16 19:41:58 | nascheme | set | messageid: <1531770118.1.0.56676864532.issue31342@psf.upfronthosting.co.za> |
2018-07-16 19:41:58 | nascheme | link | issue31342 messages |
2018-07-16 19:41:58 | nascheme | create | |
|