Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8a1a17b3
Commit
8a1a17b3
authored
Nov 30, 2012
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant check for symlink. (closes #6036)
Patch by Bruno Dupuis.
parent
8da8268b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
Lib/test/test_posixpath.py
Lib/test/test_posixpath.py
+14
-13
No files found.
Lib/test/test_posixpath.py
View file @
8a1a17b3
...
...
@@ -110,8 +110,10 @@ class PosixPathTest(unittest.TestCase):
),
True
)
# If we don't have links, assume that os.stat doesn't return resonable
# inode information and thus, that samefile() doesn't work
# If we don't have links, assume that os.stat doesn't return
# reasonable inode information and thus, that samefile() doesn't
# work.
if
hasattr
(
os
,
"symlink"
):
os
.
symlink
(
test_support
.
TESTFN
+
"1"
,
...
...
@@ -152,18 +154,17 @@ class PosixPathTest(unittest.TestCase):
True
)
# If we don't have links, assume that os.stat() doesn't return resonable
# inode information and thus, that same
file
() doesn't work
# inode information and thus, that same
stat
() doesn't work
if
hasattr
(
os
,
"symlink"
):
if
hasattr
(
os
,
"symlink"
):
os
.
symlink
(
test_support
.
TESTFN
+
"1"
,
test_support
.
TESTFN
+
"2"
)
self
.
assertIs
(
posixpath
.
samestat
(
os
.
stat
(
test_support
.
TESTFN
+
"1"
),
os
.
stat
(
test_support
.
TESTFN
+
"2"
)
),
True
)
os
.
remove
(
test_support
.
TESTFN
+
"2"
)
os
.
symlink
(
test_support
.
TESTFN
+
"1"
,
test_support
.
TESTFN
+
"2"
)
self
.
assertIs
(
posixpath
.
samestat
(
os
.
stat
(
test_support
.
TESTFN
+
"1"
),
os
.
stat
(
test_support
.
TESTFN
+
"2"
)
),
True
)
os
.
remove
(
test_support
.
TESTFN
+
"2"
)
f
=
open
(
test_support
.
TESTFN
+
"2"
,
"wb"
)
f
.
write
(
"bar"
)
f
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment