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
b43dd4b8
Kaydet (Commit)
b43dd4b8
authored
May 23, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.1
üst
ad234203
2cca0572
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
test_codecs.py
Lib/test/test_codecs.py
+6
-7
No files found.
Lib/test/test_codecs.py
Dosyayı görüntüle @
b43dd4b8
...
...
@@ -514,13 +514,11 @@ class UTF16Test(ReadTest):
s1
=
'Hello
\r\n
world
\r\n
'
s
=
s1
.
encode
(
self
.
encoding
)
try
:
with
open
(
support
.
TESTFN
,
'wb'
)
as
fp
:
fp
.
write
(
s
)
with
codecs
.
open
(
support
.
TESTFN
,
'U'
,
encoding
=
self
.
encoding
)
as
reader
:
self
.
assertEqual
(
reader
.
read
(),
s1
)
finally
:
support
.
unlink
(
support
.
TESTFN
)
self
.
addCleanup
(
support
.
unlink
,
support
.
TESTFN
)
with
open
(
support
.
TESTFN
,
'wb'
)
as
fp
:
fp
.
write
(
s
)
with
codecs
.
open
(
support
.
TESTFN
,
'U'
,
encoding
=
self
.
encoding
)
as
reader
:
self
.
assertEqual
(
reader
.
read
(),
s1
)
class
UTF16LETest
(
ReadTest
):
encoding
=
"utf-16-le"
...
...
@@ -1624,6 +1622,7 @@ class BomTest(unittest.TestCase):
"utf-32"
,
"utf-32-le"
,
"utf-32-be"
)
self
.
addCleanup
(
support
.
unlink
,
support
.
TESTFN
)
for
encoding
in
tests
:
# Check if the BOM is written only once
with
codecs
.
open
(
support
.
TESTFN
,
'w+'
,
encoding
=
encoding
)
as
f
:
...
...
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