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
27ddb576
Kaydet (Commit)
27ddb576
authored
Eki 28, 2012
tarafından
Hynek Schlawack
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1492704: Ensure and document backward compatibility of the change
üst
58879590
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
shutil.rst
Doc/library/shutil.rst
+2
-1
test_shutil.py
Lib/test/test_shutil.py
+2
-0
No files found.
Doc/library/shutil.rst
Dosyayı görüntüle @
27ddb576
...
@@ -70,7 +70,8 @@ Directory and files operations
...
@@ -70,7 +70,8 @@ Directory and files operations
Now returns *dst*.
Now returns *dst*.
.. versionchanged:: 3.4
.. versionchanged:: 3.4
Raise :exc:`SameFileError` instead of :exc:`Error`.
Raise :exc:`SameFileError` instead of :exc:`Error`. Since the former is
a subclass of the latter, this change is backward compatible.
.. exception:: SameFileError
.. exception:: SameFileError
...
...
Lib/test/test_shutil.py
Dosyayı görüntüle @
27ddb576
...
@@ -1223,6 +1223,8 @@ class TestShutil(unittest.TestCase):
...
@@ -1223,6 +1223,8 @@ class TestShutil(unittest.TestCase):
src_file
=
os
.
path
.
join
(
src_dir
,
'foo'
)
src_file
=
os
.
path
.
join
(
src_dir
,
'foo'
)
write_file
(
src_file
,
'foo'
)
write_file
(
src_file
,
'foo'
)
self
.
assertRaises
(
SameFileError
,
shutil
.
copyfile
,
src_file
,
src_file
)
self
.
assertRaises
(
SameFileError
,
shutil
.
copyfile
,
src_file
,
src_file
)
# But Error should work too, to stay backward compatible.
self
.
assertRaises
(
Error
,
shutil
.
copyfile
,
src_file
,
src_file
)
def
test_copytree_return_value
(
self
):
def
test_copytree_return_value
(
self
):
# copytree returns its destination path.
# copytree returns its destination path.
...
...
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