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
60e23f4c
Kaydet (Commit)
60e23f4c
authored
Şub 14, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Change doctest exception example to one whose detail hasn't changed since 1.5.2.
üst
0eea1663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
doctest.py
Lib/doctest.py
+4
-4
test_doctest
Lib/test/output/test_doctest
+2
-2
No files found.
Lib/doctest.py
Dosyayı görüntüle @
60e23f4c
...
...
@@ -159,10 +159,10 @@ WHAT ABOUT EXCEPTIONS?
No problem, as long as the only output generated by the example is the
traceback itself. For example:
>>>
1/0
>>>
[1, 2, 3].remove(42)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ValueError: list.remove(x): x not in list
>>>
Note that only the exception type and value are compared (specifically,
...
...
@@ -244,11 +244,11 @@ If you execute this very file, the examples above will be found and
executed, leading to this output in verbose mode:
Running doctest.__doc__
Trying:
1/0
Trying:
[1, 2, 3].remove(42)
Expecting:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ValueError: list.remove(x): x not in list
ok
Trying: x = 12
Expecting: nothing
...
...
Lib/test/output/test_doctest
Dosyayı görüntüle @
60e23f4c
test_doctest
Running doctest.__doc__
Trying:
1/0
Trying:
[1, 2, 3].remove(42)
Expecting:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ValueError: list.remove(x): x not in list
ok
Trying: x = 12
Expecting: nothing
...
...
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