This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Minor fix in test_file2k.OtherFileTests.testOpenDir
Type: Stage: resolved
Components: Tests Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, giampaolo.rodola, michael.foord, ocean-city, pitrou
Priority: normal Keywords: easy, patch

Created on 2010-07-17 14:39 by ocean-city, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_file.patch ocean-city, 2010-07-17 14:39
Messages (5)
msg110563 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-07-17 14:39
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.
msg110564 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-17 14:45
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 :)
msg115041 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-26 22:55
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.
msg115042 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-26 22:57
Wait, the test with the small brokenness still exists in 2.7, it’s been renamed (see new bug title).
msg117203 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-23 15:59
I've committed your fix in r84975. Thank you.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53533
2010-09-23 15:59:52ocean-citysetstatus: open -> closed
resolution: fixed
messages: + msg117203

stage: patch review -> resolved
2010-08-26 22:57:41eric.araujosetstatus: closed -> open
versions: + Python 2.7, - Python 2.6
title: Cosmetic fix in OtherFileTests.testOpenDir -> Minor fix in test_file2k.OtherFileTests.testOpenDir
messages: + msg115042

resolution: out of date -> (no value)
stage: resolved -> patch review
2010-08-26 22:55:32eric.araujosetstatus: open -> closed

nosy: + pitrou, giampaolo.rodola, michael.foord
messages: + msg115041

resolution: out of date
stage: patch review -> resolved
2010-07-17 14:45:15eric.araujosetnosy: + eric.araujo
messages: + msg110564
2010-07-17 14:39:02ocean-citycreate