Hello. In OtherFileTests.testOpenDir(test_file), if we run this test in Lib/test, __file__ becomes "test_file.py", so os.path.dirname(__file__) becomes "". I think it is better to use os.path.abspath to get valid folder path for test purpose. # This test seems not to exist in Python2.7.
Thanks for the report. I have had exceptions in distutils2 tests because of this exact same thing; my fix was to use “os.path.dirname(__file__) or os.curdir”. I’ll change that if people more knowledgeable than me say your fix is better :)
This fell out of my radar, sorry. 2.6 is in security mode now, so this won’t be fixed. I’m adding people listed in the “testing” interest area in Misc/maintainers.rst in case someone has an answer to my question.
status: closed -> openversions: + Python 2.7, - Python 2.6title: Cosmetic fix in OtherFileTests.testOpenDir -> Minor fix in test_file2k.OtherFileTests.testOpenDirmessages: + resolution: out of date -> (no value)stage: resolved -> patch review