mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove redundant check for symlink. (closes #6036)
Patch by Bruno Dupuis.
This commit is contained in:
parent
8da8268b1f
commit
8a1a17b309
1 changed files with 14 additions and 13 deletions
|
@ -110,8 +110,10 @@ class PosixPathTest(unittest.TestCase):
|
||||||
),
|
),
|
||||||
True
|
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"):
|
if hasattr(os, "symlink"):
|
||||||
os.symlink(
|
os.symlink(
|
||||||
test_support.TESTFN + "1",
|
test_support.TESTFN + "1",
|
||||||
|
@ -152,8 +154,7 @@ class PosixPathTest(unittest.TestCase):
|
||||||
True
|
True
|
||||||
)
|
)
|
||||||
# If we don't have links, assume that os.stat() doesn't return resonable
|
# If we don't have links, assume that os.stat() doesn't return resonable
|
||||||
# inode information and thus, that samefile() doesn't work
|
# inode information and thus, that samestat() doesn't work
|
||||||
if hasattr(os, "symlink"):
|
|
||||||
if hasattr(os, "symlink"):
|
if hasattr(os, "symlink"):
|
||||||
os.symlink(test_support.TESTFN + "1", test_support.TESTFN + "2")
|
os.symlink(test_support.TESTFN + "1", test_support.TESTFN + "2")
|
||||||
self.assertIs(
|
self.assertIs(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue