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
04a86617
Kaydet (Commit)
04a86617
authored
Ara 19, 2001
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add test for pickling new-style class with custom metaclass.
üst
f8314291
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
pickletester.py
Lib/test/pickletester.py
+12
-0
No files found.
Lib/test/pickletester.py
Dosyayı görüntüle @
04a86617
...
@@ -24,6 +24,12 @@ class initarg(C):
...
@@ -24,6 +24,12 @@ class initarg(C):
def
__getinitargs__
(
self
):
def
__getinitargs__
(
self
):
return
self
.
a
,
self
.
b
return
self
.
a
,
self
.
b
class
metaclass
(
type
):
pass
class
use_metaclass
(
object
):
__metaclass__
=
metaclass
# break into multiple strings to avoid confusing font-lock-mode
# break into multiple strings to avoid confusing font-lock-mode
DATA
=
"""(lp1
DATA
=
"""(lp1
I0
I0
...
@@ -236,6 +242,12 @@ class AbstractPickleTests(unittest.TestCase):
...
@@ -236,6 +242,12 @@ class AbstractPickleTests(unittest.TestCase):
def
test_getinitargs
(
self
):
def
test_getinitargs
(
self
):
pass
pass
def
test_metaclass
(
self
):
a
=
use_metaclass
()
s
=
self
.
dumps
(
a
)
b
=
self
.
loads
(
s
)
self
.
assertEqual
(
a
.
__class__
,
b
.
__class__
)
class
AbstractPickleModuleTests
(
unittest
.
TestCase
):
class
AbstractPickleModuleTests
(
unittest
.
TestCase
):
def
test_dump_closed_file
(
self
):
def
test_dump_closed_file
(
self
):
...
...
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