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
d0d0b658
Kaydet (Commit)
d0d0b658
authored
Eki 23, 2008
tarafından
Hirokazu Yamamoto
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL.
Reviewed by Benjamin Peterson.
üst
ffc9479a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
test_bytes.py
Lib/test/test_bytes.py
+2
-2
test_range.py
Lib/test/test_range.py
+1
-1
No files found.
Lib/test/test_bytes.py
Dosyayı görüntüle @
d0d0b658
...
...
@@ -397,7 +397,7 @@ class BaseBytesTest(unittest.TestCase):
self
.
assertEqual
(
b
.
rpartition
(
b
'i'
),
(
b
'mississipp'
,
b
'i'
,
b
''
))
def
test_pickling
(
self
):
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
):
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
):
for
b
in
b
""
,
b
"a"
,
b
"abc"
,
b
"
\xff
ab
\x80
"
,
b
"
\0\0\377\0\0
"
:
b
=
self
.
type2test
(
b
)
ps
=
pickle
.
dumps
(
b
,
proto
)
...
...
@@ -979,7 +979,7 @@ class ByteArraySubclassTest(unittest.TestCase):
a
=
ByteArraySubclass
(
b
"abcd"
)
a
.
x
=
10
a
.
y
=
ByteArraySubclass
(
b
"efgh"
)
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
):
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
):
b
=
pickle
.
loads
(
pickle
.
dumps
(
a
,
proto
))
self
.
assertNotEqual
(
id
(
a
),
id
(
b
))
self
.
assertEqual
(
a
,
b
)
...
...
Lib/test/test_range.py
Dosyayı görüntüle @
d0d0b658
...
...
@@ -65,7 +65,7 @@ class RangeTest(unittest.TestCase):
def
test_pickling
(
self
):
testcases
=
[(
13
,),
(
0
,
11
),
(
-
22
,
10
),
(
20
,
3
,
-
1
),
(
13
,
21
,
3
),
(
-
2
,
2
,
2
)]
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
):
for
proto
in
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
):
for
t
in
testcases
:
r
=
range
(
*
t
)
self
.
assertEquals
(
list
(
pickle
.
loads
(
pickle
.
dumps
(
r
,
proto
))),
...
...
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