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
3e67c5c5
Kaydet (Commit)
3e67c5c5
authored
Tem 30, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert r83267, as it breaks a few doctests and generally leads to ugly truncated output.
üst
19746cb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
29 deletions
+2
-29
pdb.py
Lib/pdb.py
+2
-2
test_pdb.py
Lib/test/test_pdb.py
+0
-27
No files found.
Lib/pdb.py
Dosyayı görüntüle @
3e67c5c5
...
@@ -237,7 +237,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
...
@@ -237,7 +237,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if
type
(
t
)
==
type
(
''
):
if
type
(
t
)
==
type
(
''
):
exc_type_name
=
t
exc_type_name
=
t
else
:
exc_type_name
=
t
.
__name__
else
:
exc_type_name
=
t
.
__name__
print
>>
self
.
stdout
,
'***'
,
exc_type_name
+
':'
,
_saferepr
(
v
)
print
>>
self
.
stdout
,
'***'
,
exc_type_name
+
':'
,
v
def
precmd
(
self
,
line
):
def
precmd
(
self
,
line
):
"""Handle alias expansion and ';;' separator."""
"""Handle alias expansion and ';;' separator."""
...
@@ -753,7 +753,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
...
@@ -753,7 +753,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if
isinstance
(
t
,
str
):
if
isinstance
(
t
,
str
):
exc_type_name
=
t
exc_type_name
=
t
else
:
exc_type_name
=
t
.
__name__
else
:
exc_type_name
=
t
.
__name__
print
>>
self
.
stdout
,
'***'
,
exc_type_name
+
':'
,
_safe
repr
(
v
)
print
>>
self
.
stdout
,
'***'
,
exc_type_name
+
':'
,
repr
(
v
)
raise
raise
def
do_p
(
self
,
arg
):
def
do_p
(
self
,
arg
):
...
...
Lib/test/test_pdb.py
Dosyayı görüntüle @
3e67c5c5
...
@@ -126,33 +126,6 @@ def test_pdb_skip_modules_with_callback():
...
@@ -126,33 +126,6 @@ def test_pdb_skip_modules_with_callback():
"""
"""
def
test_pdb_unicode_exception
():
r"""This tests exceptions that cannot be displayed due to Unicode issues.
http://bugs.python.org/issue7539
>>> def test_function():
... import pdb; pdb.Pdb().set_trace()
... pass
>>> def raising_function():
... raise ValueError(u"\xff")
>>> with PdbTestInput([
... 'raising_function()',
... 'p raising_function()',
... 'continue',
... ]):
... test_function()
> <doctest test.test_pdb.test_pdb_unicode_exception[0]>(3)test_function()
-> pass
(Pdb) raising_function()
*** ValueError: ValueError(u'\xff',)
(Pdb) p raising_function()
*** ValueError: ValueError(u'\xff',)
(Pdb) continue
"""
def
test_main
():
def
test_main
():
from
test
import
test_pdb
from
test
import
test_pdb
test_support
.
run_doctest
(
test_pdb
,
verbosity
=
True
)
test_support
.
run_doctest
(
test_pdb
,
verbosity
=
True
)
...
...
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