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
48ecaccf
Kaydet (Commit)
48ecaccf
authored
Kas 12, 2004
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
testing control chars and non-dict root objects
üst
b84330d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
test_plistlib.py
Lib/test/test_plistlib.py
+16
-0
No files found.
Lib/test/test_plistlib.py
Dosyayı görüntüle @
48ecaccf
...
@@ -164,6 +164,22 @@ class TestPlistlib(unittest.TestCase):
...
@@ -164,6 +164,22 @@ class TestPlistlib(unittest.TestCase):
pl2
=
plistlib
.
readPlist
(
StringIO
(
f
.
getvalue
()))
pl2
=
plistlib
.
readPlist
(
StringIO
(
f
.
getvalue
()))
self
.
assertEqual
(
dict
(
pl
),
dict
(
pl2
))
self
.
assertEqual
(
dict
(
pl
),
dict
(
pl2
))
def
test_controlcharacters
(
self
):
# chars in the range 0..31 are replaced by '?', except for
# \r, \n and \t since they aren't legal XML characters
testString
=
""
.
join
([
chr
(
i
)
for
i
in
range
(
32
)])
expectedResult
=
'?????????
\t\n
??
\n
??????????????????'
xml
=
plistlib
.
writePlistToString
(
testString
)
result
=
plistlib
.
readPlistFromString
(
xml
)
self
.
assertEqual
(
result
,
expectedResult
)
def
test_nondictroot
(
self
):
test1
=
"abc"
test2
=
[
1
,
2
,
3
,
"abc"
]
result1
=
plistlib
.
readPlistFromString
(
plistlib
.
writePlistToString
(
test1
))
result2
=
plistlib
.
readPlistFromString
(
plistlib
.
writePlistToString
(
test2
))
self
.
assertEqual
(
test1
,
result1
)
self
.
assertEqual
(
test2
,
result2
)
def
test_main
():
def
test_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