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
20d15b51
Kaydet (Commit)
20d15b51
authored
Eki 11, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24164: Fixed test_descr: __getnewargs_ex__ now is supported in protocols 2 and 3.
üst
99deb198
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
test_descr.py
Lib/test/test_descr.py
+1
-8
No files found.
Lib/test/test_descr.py
Dosyayı görüntüle @
20d15b51
...
@@ -4738,11 +4738,8 @@ class PicklingTests(unittest.TestCase):
...
@@ -4738,11 +4738,8 @@ class PicklingTests(unittest.TestCase):
return
(
args
,
kwargs
)
return
(
args
,
kwargs
)
obj
=
C3
()
obj
=
C3
()
for
proto
in
protocols
:
for
proto
in
protocols
:
if
proto
>=
4
:
if
proto
>=
2
:
self
.
_check_reduce
(
proto
,
obj
,
args
,
kwargs
)
self
.
_check_reduce
(
proto
,
obj
,
args
,
kwargs
)
elif
proto
>=
2
:
with
self
.
assertRaises
(
ValueError
):
obj
.
__reduce_ex__
(
proto
)
class
C4
:
class
C4
:
def
__getnewargs_ex__
(
self
):
def
__getnewargs_ex__
(
self
):
...
@@ -5061,10 +5058,6 @@ class PicklingTests(unittest.TestCase):
...
@@ -5061,10 +5058,6 @@ class PicklingTests(unittest.TestCase):
kwargs
=
getattr
(
cls
,
'KWARGS'
,
{})
kwargs
=
getattr
(
cls
,
'KWARGS'
,
{})
obj
=
cls
(
*
cls
.
ARGS
,
**
kwargs
)
obj
=
cls
(
*
cls
.
ARGS
,
**
kwargs
)
proto
=
pickle_copier
.
proto
proto
=
pickle_copier
.
proto
if
2
<=
proto
<
4
and
hasattr
(
cls
,
'__getnewargs_ex__'
):
with
self
.
assertRaises
(
ValueError
):
pickle_copier
.
dumps
(
obj
,
proto
)
continue
objcopy
=
pickle_copier
.
copy
(
obj
)
objcopy
=
pickle_copier
.
copy
(
obj
)
self
.
_assert_is_copy
(
obj
,
objcopy
)
self
.
_assert_is_copy
(
obj
,
objcopy
)
# For test classes that supports this, make sure we didn't go
# For test classes that supports this, make sure we didn't go
...
...
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