Neil Schemenauer added the comment: The key is how the test is run. If you run:
$ ./python Lib/test/<some script>.py Then the Lib/test gets added to the first part of sys.path. Then "import bisect" imports the Lib/test/bisect.py module rather than Lib/bisect.py. Obvious options seem to be: 1. rename Lib/test/bisect.py to something else 2. don't allow running files in Lib/test as scripts To me, #2 is not a good option. I'm attaching the output of: ./python.exe Lib/test/regrtest.py -v test_datetime 2>&1 In case it is helpful. I pruned some lines to keep the file smaller. ---------- Added file: http://bugs.python.org/file47119/test_datetime_out.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31342> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com