Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix in test_file2k.OtherFileTests.testOpenDir #53533

Closed
ocean-city mannequin opened this issue Jul 17, 2010 · 5 comments
Closed

Minor fix in test_file2k.OtherFileTests.testOpenDir #53533

ocean-city mannequin opened this issue Jul 17, 2010 · 5 comments
Labels
easy tests Tests in the Lib/test dir

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented Jul 17, 2010

BPO 9287
Nosy @pitrou, @giampaolo, @merwok, @voidspace
Files
  • test_file.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-09-23.15:59:52.626>
    created_at = <Date 2010-07-17.14:39:02.614>
    labels = ['easy', 'tests']
    title = 'Minor fix in test_file2k.OtherFileTests.testOpenDir'
    updated_at = <Date 2010-09-23.15:59:52.593>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2010-09-23.15:59:52.593>
    actor = 'ocean-city'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-23.15:59:52.626>
    closer = 'ocean-city'
    components = ['Tests']
    creation = <Date 2010-07-17.14:39:02.614>
    creator = 'ocean-city'
    dependencies = []
    files = ['18040']
    hgrepos = []
    issue_num = 9287
    keywords = ['patch', 'easy']
    message_count = 5.0
    messages = ['110563', '110564', '115041', '115042', '117203']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'ocean-city', 'giampaolo.rodola', 'eric.araujo', 'michael.foord']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue9287'
    versions = ['Python 2.7']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Jul 17, 2010

    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.

    @ocean-city ocean-city mannequin added tests Tests in the Lib/test dir easy labels Jul 17, 2010
    @merwok
    Copy link
    Member

    merwok commented Jul 17, 2010

    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 :)

    @merwok
    Copy link
    Member

    merwok commented Aug 26, 2010

    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.

    @merwok merwok closed this as completed Aug 26, 2010
    @merwok
    Copy link
    Member

    merwok commented Aug 26, 2010

    Wait, the test with the small brokenness still exists in 2.7, it’s been renamed (see new bug title).

    @merwok merwok reopened this Aug 26, 2010
    @merwok merwok changed the title Cosmetic fix in OtherFileTests.testOpenDir Minor fix in test_file2k.OtherFileTests.testOpenDir Aug 26, 2010
    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Sep 23, 2010

    I've committed your fix in r84975. Thank you.

    @ocean-city ocean-city mannequin closed this as completed Sep 23, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant