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
5662929a
Kaydet (Commit)
5662929a
authored
Agu 26, 2004
tarafından
Edward Loper
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Shortened diff output for unified & context diffs
üst
aacf0833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
doctest.py
Lib/doctest.py
+6
-6
test_doctest.py
Lib/test/test_doctest.py
+2
-6
No files found.
Lib/doctest.py
Dosyayı görüntüle @
5662929a
...
...
@@ -1618,13 +1618,13 @@ class OutputChecker:
got_lines
=
[
l
+
'
\n
'
for
l
in
got
.
split
(
'
\n
'
)]
# Use difflib to find their differences.
if
optionflags
&
UNIFIED_DIFF
:
diff
=
difflib
.
unified_diff
(
want_lines
,
got_lines
,
n
=
2
,
fromfile
=
'Expected'
,
tofile
=
'Got'
)
kind
=
'unified diff'
diff
=
difflib
.
unified_diff
(
want_lines
,
got_lines
,
n
=
2
)
diff
=
list
(
diff
)[
2
:]
# strip the diff header
kind
=
'unified diff
with -expected +actual
'
elif
optionflags
&
CONTEXT_DIFF
:
diff
=
difflib
.
context_diff
(
want_lines
,
got_lines
,
n
=
2
,
fromfile
=
'Expected'
,
tofile
=
'Got'
)
kind
=
'context diff'
diff
=
difflib
.
context_diff
(
want_lines
,
got_lines
,
n
=
2
)
diff
=
list
(
diff
)[
2
:]
# strip the diff header
kind
=
'context diff
with expected followed by actual
'
elif
optionflags
&
NDIFF_DIFF
:
engine
=
difflib
.
Differ
(
charjunk
=
difflib
.
IS_CHARACTER_JUNK
)
diff
=
list
(
engine
.
compare
(
want_lines
,
got_lines
))
...
...
Lib/test/test_doctest.py
Dosyayı görüntüle @
5662929a
...
...
@@ -971,9 +971,7 @@ and actual outputs to be displayed using a unified diff:
Line 2, in f
Failed example:
print '\n'.join('abcdefg')
Differences (unified diff):
--- Expected
+++ Got
Differences (unified diff with -expected +actual):
@@ -1,8 +1,8 @@
a
-B
...
...
@@ -998,9 +996,7 @@ and actual outputs to be displayed using a context diff:
Line 2, in f
Failed example:
print '\n'.join('abcdefg')
Differences (context diff):
*** Expected
--- Got
Differences (context diff with expected followed by actual):
***************
*** 1,8 ****
a
...
...
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