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
53386d8f
Kaydet (Commit)
53386d8f
authored
Agu 01, 2012
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15463: Write a test for faulthandler truncating the name of functions
to 500 characters.
üst
98a387b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
test_faulthandler.py
Lib/test/test_faulthandler.py
+24
-0
No files found.
Lib/test/test_faulthandler.py
Dosyayı görüntüle @
53386d8f
...
...
@@ -316,6 +316,30 @@ funcA()
with
temporary_filename
()
as
filename
:
self
.
check_dump_traceback
(
filename
)
def
test_truncate
(
self
):
maxlen
=
500
func_name
=
'x'
*
(
maxlen
+
50
)
truncated
=
'x'
*
maxlen
+
'...'
code
=
"""
import faulthandler
def {func_name}():
faulthandler.dump_traceback(all_threads=False)
{func_name}()
"""
.
strip
()
code
=
code
.
format
(
func_name
=
func_name
,
)
expected
=
[
'Traceback (most recent call first):'
,
' File "<string>", line 4 in
%
s'
%
truncated
,
' File "<string>", line 6 in <module>'
]
trace
,
exitcode
=
self
.
get_output
(
code
)
self
.
assertEqual
(
trace
,
expected
)
self
.
assertEqual
(
exitcode
,
0
)
@unittest.skipIf
(
not
HAVE_THREADS
,
'need threads'
)
def
check_dump_traceback_threads
(
self
,
filename
):
"""
...
...
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