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

Clean up test_posixpath.py #50286

Closed
phihag mannequin opened this issue May 16, 2009 · 4 comments
Closed

Clean up test_posixpath.py #50286

phihag mannequin opened this issue May 16, 2009 · 4 comments
Labels
tests Tests in the Lib/test dir

Comments

@phihag
Copy link
Mannequin

phihag mannequin commented May 16, 2009

BPO 6036
Nosy @loewis
Files
  • test_posixpath-cleanup.diff: Patch that removes second hasattr and adds shebang, svn:executable
  • 6036_test_posixpath_cleanup_2.7.patch: remove a useless if + typo in comment
  • 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 2012-11-30.21:15:52.308>
    created_at = <Date 2009-05-16.09:20:57.766>
    labels = ['tests']
    title = 'Clean up test_posixpath.py'
    updated_at = <Date 2012-11-30.21:15:52.290>
    user = 'https://bugs.python.org/phihag'

    bugs.python.org fields:

    activity = <Date 2012-11-30.21:15:52.290>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-11-30.21:15:52.308>
    closer = 'python-dev'
    components = ['Tests']
    creation = <Date 2009-05-16.09:20:57.766>
    creator = 'phihag'
    dependencies = []
    files = ['13995', '28170']
    hgrepos = []
    issue_num = 6036
    keywords = ['patch']
    message_count = 4.0
    messages = ['87871', '112174', '176716', '176719']
    nosy_count = 5.0
    nosy_names = ['loewis', 'phihag', 'BreamoreBoy', 'python-dev', 'bruno.dupuis']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue6036'
    versions = ['Python 2.7']

    @phihag
    Copy link
    Mannequin Author

    phihag mannequin commented May 16, 2009

    At line 300 (version 72674) there is the following interesting construction:

    if hasattr(os, "symlink"):
         if hasattr(os, "symlink"):
              (...)
         (...)

    hasattr is idempotent.

    Additionally, test_posixpath.py is missing the shebang and the
    svn:executable property.

    @phihag phihag mannequin added the tests Tests in the Lib/test dir label May 16, 2009
    @phihag phihag mannequin changed the title test_posixpath.py Clean up test_posixpath.py May 16, 2009
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 31, 2010

    The duplicate hasattr test still exists in 2.7 but the code has been rewritten for py3k. The shebang line is still missing but isn't used in many test files. The svn:executable property has not been set but is this needed? The OP has had finger trouble as everything appears twice in the patch file.

    @brunodupuis
    Copy link
    Mannequin

    brunodupuis mannequin commented Nov 30, 2012

    Mark, correct, this test doesn't exist in 3.X branches. I updated the patch for 2.7. It is trivial, so if someone may merge it, we could close this bug (please, before next SCM switch :-) )

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 30, 2012

    New changeset 980b13df6ccd by Benjamin Peterson in branch '2.7':
    Remove redundant check for symlink. (closes bpo-6036)
    http://hg.python.org/cpython/rev/980b13df6ccd

    @python-dev python-dev mannequin closed this as completed Nov 30, 2012
    @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
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants