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: Clean up test_posixpath.py
Type: Stage: resolved
Components: Tests Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, bruno.dupuis, loewis, phihag, python-dev
Priority: normal Keywords: patch

Created on 2009-05-16 09:20 by phihag, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_posixpath-cleanup.diff phihag, 2009-05-16 09:20 Patch that removes second hasattr and adds shebang, svn:executable
6036_test_posixpath_cleanup_2.7.patch bruno.dupuis, 2012-11-30 20:47 remove a useless if + typo in comment review
Messages (4)
msg87871 - (view) Author: Philipp Hagemeister (phihag) * Date: 2009-05-16 09:20
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.
msg112174 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-31 17:50
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.
msg176716 - (view) Author: Bruno Dupuis (bruno.dupuis) Date: 2012-11-30 20:47
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 :-) )
msg176719 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-30 21:15
New changeset 980b13df6ccd by Benjamin Peterson in branch '2.7':
Remove redundant check for symlink. (closes #6036)
http://hg.python.org/cpython/rev/980b13df6ccd
History
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50286
2012-11-30 21:15:52python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg176719

resolution: fixed
stage: patch review -> resolved
2012-11-30 20:47:43bruno.dupuissetfiles: + 6036_test_posixpath_cleanup_2.7.patch
nosy: + loewis
messages: + msg176716

2012-11-30 14:54:49bruno.dupuissetnosy: + bruno.dupuis
2010-07-31 17:50:08BreamoreBoysetversions: - Python 3.2
nosy: + BreamoreBoy

messages: + msg112174

stage: patch review
2009-05-16 09:21:44phihagsettitle: test_posixpath.py -> Clean up test_posixpath.py
2009-05-16 09:20:57phihagcreate