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
0970657f
Kaydet (Commit)
0970657f
authored
Tem 28, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix sporadic failure of test_pep277 on Windows: use support.rmtree() instead of
deltree().
üst
e0e65817
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
24 deletions
+9
-24
test_pep277.py
Lib/test/test_pep277.py
+9
-24
No files found.
Lib/test/test_pep277.py
Dosyayı görüntüle @
0970657f
...
...
@@ -56,17 +56,6 @@ if not os.path.supports_unicode_filenames:
"Unicode-friendly filesystem encoding"
)
# Destroy directory dirname and all files under it, to one level.
def
deltree
(
dirname
):
# Don't hide legitimate errors: if one of these suckers exists, it's
# an error if we can't remove it.
if
os
.
path
.
exists
(
dirname
):
# must pass unicode to os.listdir() so we get back unicode results.
for
fname
in
os
.
listdir
(
str
(
dirname
)):
os
.
unlink
(
os
.
path
.
join
(
dirname
,
fname
))
os
.
rmdir
(
dirname
)
class
UnicodeFileTests
(
unittest
.
TestCase
):
files
=
set
(
filenames
)
normal_form
=
None
...
...
@@ -76,6 +65,8 @@ class UnicodeFileTests(unittest.TestCase):
os
.
mkdir
(
support
.
TESTFN
)
except
FileExistsError
:
pass
self
.
addCleanup
(
support
.
rmtree
,
support
.
TESTFN
)
files
=
set
()
for
name
in
self
.
files
:
name
=
os
.
path
.
join
(
support
.
TESTFN
,
self
.
norm
(
name
))
...
...
@@ -85,9 +76,6 @@ class UnicodeFileTests(unittest.TestCase):
files
.
add
(
name
)
self
.
files
=
files
def
tearDown
(
self
):
deltree
(
support
.
TESTFN
)
def
norm
(
self
,
s
):
if
self
.
normal_form
:
return
normalize
(
self
.
normal_form
,
s
)
...
...
@@ -200,16 +188,13 @@ class UnicodeNFKDFileTests(UnicodeFileTests):
def
test_main
():
try
:
support
.
run_unittest
(
UnicodeFileTests
,
UnicodeNFCFileTests
,
UnicodeNFDFileTests
,
UnicodeNFKCFileTests
,
UnicodeNFKDFileTests
,
)
finally
:
deltree
(
support
.
TESTFN
)
support
.
run_unittest
(
UnicodeFileTests
,
UnicodeNFCFileTests
,
UnicodeNFDFileTests
,
UnicodeNFKCFileTests
,
UnicodeNFKDFileTests
,
)
if
__name__
==
"__main__"
:
...
...
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