Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3f48ac98
Kaydet (Commit)
3f48ac98
authored
Ock 01, 2014
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
üst
b075cc0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
test_shutil.py
Lib/test/test_shutil.py
+19
-13
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_shutil.py
Dosyayı görüntüle @
3f48ac98
...
@@ -287,18 +287,20 @@ class TestShutil(unittest.TestCase):
...
@@ -287,18 +287,20 @@ class TestShutil(unittest.TestCase):
self
.
assertNotEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
self
.
assertNotEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
shutil
.
copymode
(
src
,
dst
)
shutil
.
copymode
(
src
,
dst
)
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
# follow src link
# On Windows, os.chmod does not follow symlinks (issue #15411)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
if
os
.
name
!=
'nt'
:
shutil
.
copymode
(
src_link
,
dst
)
# follow src link
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
# follow dst link
shutil
.
copymode
(
src_link
,
dst
)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
shutil
.
copymode
(
src
,
dst_link
)
# follow dst link
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
# follow both links
shutil
.
copymode
(
src
,
dst_link
)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
shutil
.
copymode
(
src_link
,
dst
)
# follow both links
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
os
.
chmod
(
dst
,
stat
.
S_IRWXO
)
shutil
.
copymode
(
src_link
,
dst_link
)
self
.
assertEqual
(
os
.
stat
(
src
)
.
st_mode
,
os
.
stat
(
dst
)
.
st_mode
)
@unittest.skipUnless
(
hasattr
(
os
,
'lchmod'
),
'requires os.lchmod'
)
@unittest.skipUnless
(
hasattr
(
os
,
'lchmod'
),
'requires os.lchmod'
)
@support.skip_unless_symlink
@support.skip_unless_symlink
...
@@ -1543,7 +1545,11 @@ class TestMove(unittest.TestCase):
...
@@ -1543,7 +1545,11 @@ class TestMove(unittest.TestCase):
dst_link
=
os
.
path
.
join
(
self
.
dst_dir
,
'quux'
)
dst_link
=
os
.
path
.
join
(
self
.
dst_dir
,
'quux'
)
shutil
.
move
(
dst
,
dst_link
)
shutil
.
move
(
dst
,
dst_link
)
self
.
assertTrue
(
os
.
path
.
islink
(
dst_link
))
self
.
assertTrue
(
os
.
path
.
islink
(
dst_link
))
self
.
assertEqual
(
os
.
path
.
realpath
(
src
),
os
.
path
.
realpath
(
dst_link
))
# On Windows, os.path.realpath does not follow symlinks (issue #9949)
if
os
.
name
==
'nt'
:
self
.
assertEqual
(
os
.
path
.
realpath
(
src
),
os
.
readlink
(
dst_link
))
else
:
self
.
assertEqual
(
os
.
path
.
realpath
(
src
),
os
.
path
.
realpath
(
dst_link
))
@support.skip_unless_symlink
@support.skip_unless_symlink
@mock_rename
@mock_rename
...
...
Misc/NEWS
Dosyayı görüntüle @
3f48ac98
...
@@ -197,6 +197,9 @@ IDLE
...
@@ -197,6 +197,9 @@ IDLE
Tests
Tests
-----
-----
- Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
- Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
- Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
disabled since 3.0 due to the changes in listcomp handling.
disabled since 3.0 due to the changes in listcomp handling.
...
...
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