[issue31342] test.bisect module causes tests to fail

2018-07-17 Thread STINNER Victor
STINNER Victor added the comment: > I considered adding a 'bisect' command to the test/__main__, e.g. you could > run 'python -m test --bisect ..'. That looks not entirely simple to > implement though. Ah yes, for the long term, integrating test.bisect directly in libregrtest would be grea

[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: Yes, it looks like the same issue as bpo-29512. Renaming test.bisect is the simplest solution. I have trained myself to run "python -m test.regrtest " so this issue doesn't affect me any more. However, I think it was a trap that will catch some people.

[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread STINNER Victor
STINNER Victor added the comment: > This is still broken, IMHO. Either we should rename test.bisect (...) I renamed it: commit 823c295efa4efea93cadc640ed6122cd9d86cec4 Author: Victor Stinner Date: Wed May 30 17:24:40 2018 +0200 bpo-29512: Rename Lib/test/bisect.py to bisect_cmd.py (#

[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: 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, anythi

[issue31342] test.bisect module causes tests to fail

2017-09-04 Thread Neil Schemenauer
Neil Schemenauer added the comment: The key is how the test is run. If you run: $ ./python Lib/test/.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 L

[issue31342] test.bisect module causes tests to fail

2017-09-04 Thread STINNER Victor
STINNER Victor added the comment: Can you put the whole traceback? I'm unable to reproduce the issue. Which datetime test uses biesct? -- ___ Python tracker ___

[issue31342] test.bisect module causes tests to fail

2017-09-04 Thread Neil Schemenauer
New submission from Neil Schemenauer: After a lot of head scratching, I have discovered why tests are failing for me. E.g. "./python Lib/test/test_datetime.py" results in AttributeError: module 'bisect' has no attribute 'bisect_right' Running tests this way causes test/bisect to be imported r