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
fb0517ca
Kaydet (Commit)
fb0517ca
authored
Nis 04, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23825: Fixed test_idle under -OO.
üst
c811328e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
test_calltips.py
Lib/idlelib/idle_test/test_calltips.py
+12
-7
No files found.
Lib/idlelib/idle_test/test_calltips.py
Dosyayı görüntüle @
fb0517ca
...
...
@@ -55,7 +55,8 @@ class Get_signatureTest(unittest.TestCase):
def
gtest
(
obj
,
out
):
self
.
assertEqual
(
signature
(
obj
),
out
)
gtest
(
List
,
'()
\n
'
+
List
.
__doc__
)
if
List
.
__doc__
is
not
None
:
gtest
(
List
,
'()
\n
'
+
List
.
__doc__
)
gtest
(
list
.
__new__
,
'T.__new__(S, ...) -> a new object with type S, a subtype of T'
)
gtest
(
list
.
__init__
,
...
...
@@ -70,7 +71,8 @@ class Get_signatureTest(unittest.TestCase):
def
test_signature_wrap
(
self
):
# This is also a test of an old-style class
self
.
assertEqual
(
signature
(
textwrap
.
TextWrapper
),
'''
\
if
textwrap
.
TextWrapper
.
__doc__
is
not
None
:
self
.
assertEqual
(
signature
(
textwrap
.
TextWrapper
),
'''
\
(width=70, initial_indent='', subsequent_indent='', expand_tabs=True,
replace_whitespace=True, fix_sentence_endings=False, break_long_words=True,
drop_whitespace=True, break_on_hyphens=True)'''
)
...
...
@@ -106,20 +108,23 @@ class Get_signatureTest(unittest.TestCase):
def
t5
(
a
,
b
=
None
,
*
args
,
**
kwds
):
'doc'
t5
.
tip
=
"(a, b=None, *args, **kwargs)"
doc
=
'
\n
doc'
if
t1
.
__doc__
is
not
None
else
''
for
func
in
(
t1
,
t2
,
t3
,
t4
,
t5
,
TC
):
self
.
assertEqual
(
signature
(
func
),
func
.
tip
+
'
\n
doc'
)
self
.
assertEqual
(
signature
(
func
),
func
.
tip
+
doc
)
def
test_methods
(
self
):
doc
=
'
\n
doc'
if
TC
.
__doc__
is
not
None
else
''
for
meth
in
(
TC
.
t1
,
TC
.
t2
,
TC
.
t3
,
TC
.
t4
,
TC
.
t5
,
TC
.
t6
,
TC
.
__call__
):
self
.
assertEqual
(
signature
(
meth
),
meth
.
tip
+
"
\n
doc"
)
self
.
assertEqual
(
signature
(
TC
.
cm
),
"(a)
\n
doc"
)
self
.
assertEqual
(
signature
(
TC
.
sm
),
"(b)
\n
doc"
)
self
.
assertEqual
(
signature
(
meth
),
meth
.
tip
+
doc
)
self
.
assertEqual
(
signature
(
TC
.
cm
),
"(a)
"
+
doc
)
self
.
assertEqual
(
signature
(
TC
.
sm
),
"(b)
"
+
doc
)
def
test_bound_methods
(
self
):
# test that first parameter is correctly removed from argspec
doc
=
'
\n
doc'
if
TC
.
__doc__
is
not
None
else
''
for
meth
,
mtip
in
((
tc
.
t1
,
"()"
),
(
tc
.
t4
,
"(*args)"
),
(
tc
.
t6
,
"(self)"
),
(
tc
.
__call__
,
'(ci)'
),
(
tc
,
'(ci)'
),
(
TC
.
cm
,
"(a)"
),):
self
.
assertEqual
(
signature
(
meth
),
mtip
+
"
\n
doc"
)
self
.
assertEqual
(
signature
(
meth
),
mtip
+
doc
)
def
test_starred_parameter
(
self
):
# test that starred first parameter is *not* removed from argspec
...
...
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