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
01705215
Kaydet (Commit)
01705215
authored
Ara 11, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fiddle test_class so it passes with -Qnew.
üst
145b4795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
test_class.py
Lib/test/test_class.py
+20
-5
No files found.
Lib/test/test_class.py
Dosyayı görüntüle @
01705215
...
@@ -88,10 +88,17 @@ class AllTests:
...
@@ -88,10 +88,17 @@ class AllTests:
def
__del__
(
self
,
*
args
):
def
__del__
(
self
,
*
args
):
print
"__del__:"
,
args
print
"__del__:"
,
args
# Synthesize AllTests methods from the names in testmeths.
method_template
=
"""
\
def __
%(method)
s__(self, *args):
print "__
%(method)
s__:", args
"""
for
method
in
testmeths
:
for
method
in
testmeths
:
exec
"""def __
%(method)
s__(self, *args):
exec
method_template
%
locals
()
in
AllTests
.
__dict__
print "__
%(method)
s__:", args
"""
%
locals
()
in
AllTests
.
__dict__
del
method
,
method_template
# this also tests __init__ of course.
# this also tests __init__ of course.
testme
=
AllTests
()
testme
=
AllTests
()
...
@@ -107,8 +114,16 @@ testme - 1
...
@@ -107,8 +114,16 @@ testme - 1
testme
*
1
testme
*
1
1
*
testme
1
*
testme
testme
/
1
if
1
/
2
==
0
:
1
/
testme
testme
/
1
1
/
testme
else
:
# True division is in effect, so "/" doesn't map to __div__ etc; but
# the canned expected-output file requires that __div__ etc get called.
testme
.
__coerce__
(
1
)
testme
.
__div__
(
1
)
testme
.
__coerce__
(
1
)
testme
.
__rdiv__
(
1
)
testme
%
1
testme
%
1
1
%
testme
1
%
testme
...
...
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