[issue31342] test.bisect module causes tests to fail

Neil Schemenauer report at bugs.python.org
Tue Sep 5 00:28:08 EDT 2017


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 <report at bugs.python.org>
<http://bugs.python.org/issue31342>
_______________________________________


More information about the Python-bugs-list mailing list