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
96d7e836
Kaydet (Commit)
96d7e836
authored
Tem 30, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't try to use a bytes sequence for file paths. Also force equivalency tests
to be between str8 and str.
üst
7a265343
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
test_unicode_file.py
Lib/test/test_unicode_file.py
+3
-1
No files found.
Lib/test/test_unicode_file.py
Dosyayı görüntüle @
96d7e836
...
@@ -8,7 +8,8 @@ import unittest
...
@@ -8,7 +8,8 @@ import unittest
from
test.test_support
import
run_unittest
,
TestSkipped
,
TESTFN_UNICODE
from
test.test_support
import
run_unittest
,
TestSkipped
,
TESTFN_UNICODE
from
test.test_support
import
TESTFN_ENCODING
,
TESTFN_UNICODE_UNENCODEABLE
from
test.test_support
import
TESTFN_ENCODING
,
TESTFN_UNICODE_UNENCODEABLE
try
:
try
:
TESTFN_ENCODED
=
TESTFN_UNICODE
.
encode
(
TESTFN_ENCODING
)
TESTFN_ENCODED
=
TESTFN_UNICODE
TESTFN_UNICODE
.
encode
(
TESTFN_ENCODING
)
except
(
UnicodeError
,
TypeError
):
except
(
UnicodeError
,
TypeError
):
# Either the file system encoding is None, or the file name
# Either the file system encoding is None, or the file name
# cannot be encoded in the file system encoding.
# cannot be encoded in the file system encoding.
...
@@ -76,6 +77,7 @@ class TestUnicodeFiles(unittest.TestCase):
...
@@ -76,6 +77,7 @@ class TestUnicodeFiles(unittest.TestCase):
# Do as many "equivalancy' tests as we can - ie, check that although we
# Do as many "equivalancy' tests as we can - ie, check that although we
# have different types for the filename, they refer to the same file.
# have different types for the filename, they refer to the same file.
def
_do_equivilent
(
self
,
filename1
,
filename2
):
def
_do_equivilent
(
self
,
filename1
,
filename2
):
filename2
=
str8
(
filename2
)
# Note we only check "filename1 against filename2" - we don't bother
# Note we only check "filename1 against filename2" - we don't bother
# checking "filename2 against 1", as we assume we are called again with
# checking "filename2 against 1", as we assume we are called again with
# the args reversed.
# the args reversed.
...
...
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