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
a16de5db
Kaydet (Commit)
a16de5db
authored
Nis 01, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23821: Fixed test_pdb failure under -O.
üst
c512adc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
test_pdb.py
Lib/test/test_pdb.py
+15
-11
No files found.
Lib/test/test_pdb.py
Dosyayı görüntüle @
a16de5db
...
...
@@ -677,10 +677,12 @@ def test_pdb_next_command_for_generator():
... import pdb; pdb.Pdb(nosigint=True).set_trace()
... it = test_gen()
... try:
... assert next(it) == 0
... if next(it) != 0:
... raise AssertionError
... next(it)
... except StopIteration as ex:
... assert ex.value == 1
... if ex.value != 1:
... raise AssertionError
... print("finished")
>>> with PdbTestInput(['step',
...
...
@@ -699,7 +701,7 @@ def test_pdb_next_command_for_generator():
-> try:
(Pdb) step
> <doctest test.test_pdb.test_pdb_next_command_for_generator[1]>(5)test_function()
->
assert next(it) == 0
->
if next(it) != 0:
(Pdb) step
--Call--
> <doctest test.test_pdb.test_pdb_next_command_for_generator[0]>(1)test_gen()
...
...
@@ -716,7 +718,7 @@ def test_pdb_next_command_for_generator():
-> return 1
(Pdb) step
StopIteration: 1
> <doctest test.test_pdb.test_pdb_next_command_for_generator[1]>(
6
)test_function()
> <doctest test.test_pdb.test_pdb_next_command_for_generator[1]>(
7
)test_function()
-> next(it)
(Pdb) continue
finished
...
...
@@ -735,10 +737,12 @@ def test_pdb_return_command_for_generator():
... import pdb; pdb.Pdb(nosigint=True).set_trace()
... it = test_gen()
... try:
... assert next(it) == 0
... if next(it) != 0:
... raise AssertionError
... next(it)
... except StopIteration as ex:
... assert ex.value == 1
... if ex.value != 1:
... raise AssertionError
... print("finished")
>>> with PdbTestInput(['step',
...
...
@@ -756,21 +760,21 @@ def test_pdb_return_command_for_generator():
-> try:
(Pdb) step
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(5)test_function()
->
assert next(it) == 0
->
if next(it) != 0:
(Pdb) step
--Call--
> <doctest test.test_pdb.test_pdb_return_command_for_generator[0]>(1)test_gen()
-> def test_gen():
(Pdb) return
StopIteration: 1
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
6
)test_function()
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
7
)test_function()
-> next(it)
(Pdb) step
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
7
)test_function()
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
8
)test_function()
-> except StopIteration as ex:
(Pdb) step
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
8
)test_function()
->
assert ex.value == 1
> <doctest test.test_pdb.test_pdb_return_command_for_generator[1]>(
9
)test_function()
->
if ex.value != 1:
(Pdb) continue
finished
"""
...
...
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