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
ea4f931c
Kaydet (Commit)
ea4f931c
authored
Şub 13, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Teach doctest about newer "(most recent call last)" traceback spelling.
üst
467d723b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
doctest.py
Lib/doctest.py
+4
-3
test_doctest
Lib/test/output/test_doctest
+1
-1
No files found.
Lib/doctest.py
Dosyayı görüntüle @
ea4f931c
...
@@ -160,7 +160,7 @@ No problem, as long as the only output generated by the example is the
...
@@ -160,7 +160,7 @@ No problem, as long as the only output generated by the example is the
traceback itself. For example:
traceback itself. For example:
>>> 1/0
>>> 1/0
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ZeroDivisionError: integer division or modulo by zero
>>>
>>>
...
@@ -246,7 +246,7 @@ executed, leading to this output in verbose mode:
...
@@ -246,7 +246,7 @@ executed, leading to this output in verbose mode:
Running doctest.__doc__
Running doctest.__doc__
Trying: 1/0
Trying: 1/0
Expecting:
Expecting:
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ZeroDivisionError: integer division or modulo by zero
ok
ok
...
@@ -489,7 +489,8 @@ def _run_examples_inner(out, fakeout, examples, globs, verbose, name):
...
@@ -489,7 +489,8 @@ def _run_examples_inner(out, fakeout, examples, globs, verbose, name):
state
=
OK
state
=
OK
except
:
except
:
# See whether the exception was expected.
# See whether the exception was expected.
if
want
.
find
(
"Traceback (innermost last):
\n
"
)
==
0
:
if
want
.
find
(
"Traceback (innermost last):
\n
"
)
==
0
or
\
want
.
find
(
"Traceback (most recent call last):
\n
"
)
==
0
:
# Only compare exception type and value - the rest of
# Only compare exception type and value - the rest of
# the traceback isn't necessary.
# the traceback isn't necessary.
want
=
want
.
split
(
'
\n
'
)[
-
2
]
+
'
\n
'
want
=
want
.
split
(
'
\n
'
)[
-
2
]
+
'
\n
'
...
...
Lib/test/output/test_doctest
Dosyayı görüntüle @
ea4f931c
...
@@ -2,7 +2,7 @@ test_doctest
...
@@ -2,7 +2,7 @@ test_doctest
Running doctest.__doc__
Running doctest.__doc__
Trying: 1/0
Trying: 1/0
Expecting:
Expecting:
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
ZeroDivisionError: integer division or modulo by zero
ok
ok
...
...
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