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
df7a208f
Kaydet (Commit)
df7a208f
authored
Agu 29, 2004
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
fafd874b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
doctest.py
Lib/doctest.py
+8
-8
test_doctest.py
Lib/test/test_doctest.py
+2
-2
No files found.
Lib/doctest.py
Dosyayı görüntüle @
df7a208f
...
@@ -2014,7 +2014,7 @@ def set_unittest_reportflags(flags):
...
@@ -2014,7 +2014,7 @@ def set_unittest_reportflags(flags):
>>> doctest._unittest_reportflags == (REPORT_NDIFF |
>>> doctest._unittest_reportflags == (REPORT_NDIFF |
... REPORT_ONLY_FIRST_FAILURE)
... REPORT_ONLY_FIRST_FAILURE)
True
True
Only reporting flags can be set:
Only reporting flags can be set:
>>> set_unittest_reportflags(ELLIPSIS)
>>> set_unittest_reportflags(ELLIPSIS)
...
@@ -2036,17 +2036,17 @@ def set_unittest_reportflags(flags):
...
@@ -2036,17 +2036,17 @@ def set_unittest_reportflags(flags):
if
nrflags
:
if
nrflags
:
raise
ValueError
(
"Invalid flags passed"
,
flags
)
raise
ValueError
(
"Invalid flags passed"
,
flags
)
global
_unittest_reportflags
global
_unittest_reportflags
old
=
_unittest_reportflags
old
=
_unittest_reportflags
_unittest_reportflags
=
flags
_unittest_reportflags
=
flags
return
old
return
old
class
FakeModule
:
class
FakeModule
:
"""Fake module created by tests
"""Fake module created by tests
"""
"""
def
__init__
(
self
,
dict
,
name
):
def
__init__
(
self
,
dict
,
name
):
self
.
__dict__
=
dict
self
.
__dict__
=
dict
self
.
__name__
=
name
self
.
__name__
=
name
...
@@ -2065,7 +2065,7 @@ class DocTestCase(unittest.TestCase):
...
@@ -2065,7 +2065,7 @@ class DocTestCase(unittest.TestCase):
def
setUp
(
self
):
def
setUp
(
self
):
test
=
self
.
_dt_test
test
=
self
.
_dt_test
if
self
.
_dt_setUp
is
not
None
:
if
self
.
_dt_setUp
is
not
None
:
self
.
_dt_setUp
(
test
)
self
.
_dt_setUp
(
test
)
...
@@ -2082,12 +2082,12 @@ class DocTestCase(unittest.TestCase):
...
@@ -2082,12 +2082,12 @@ class DocTestCase(unittest.TestCase):
old
=
sys
.
stdout
old
=
sys
.
stdout
new
=
StringIO
()
new
=
StringIO
()
optionflags
=
self
.
_dt_optionflags
optionflags
=
self
.
_dt_optionflags
if
not
(
optionflags
&
valid_unittest_reportflags
):
if
not
(
optionflags
&
valid_unittest_reportflags
):
# The option flags don't include any reporting flags,
# The option flags don't include any reporting flags,
# so add the default reporting flags
# so add the default reporting flags
optionflags
|=
_unittest_reportflags
optionflags
|=
_unittest_reportflags
runner
=
DocTestRunner
(
optionflags
=
optionflags
,
runner
=
DocTestRunner
(
optionflags
=
optionflags
,
checker
=
self
.
_dt_checker
,
verbose
=
False
)
checker
=
self
.
_dt_checker
,
verbose
=
False
)
...
@@ -2327,7 +2327,7 @@ def DocFileSuite(*paths, **kw):
...
@@ -2327,7 +2327,7 @@ def DocFileSuite(*paths, **kw):
optionflags
optionflags
A set of doctest option flags expressed as an integer.
A set of doctest option flags expressed as an integer.
"""
"""
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
Lib/test/test_doctest.py
Dosyayı görüntüle @
df7a208f
...
@@ -1797,7 +1797,7 @@ def test_DocFileSuite():
...
@@ -1797,7 +1797,7 @@ def test_DocFileSuite():
Here, we didn't need to use a tearDown function because we
Here, we didn't need to use a tearDown function because we
modified the test globals. The test globals are
modified the test globals. The test globals are
automatically cleared for us after a test.
automatically cleared for us after a test.
"""
"""
def
test_trailing_space_in_test
():
def
test_trailing_space_in_test
():
...
@@ -1848,7 +1848,7 @@ def test_unittest_reportflags():
...
@@ -1848,7 +1848,7 @@ def test_unittest_reportflags():
NameError: name 'favorite_color' is not defined
NameError: name 'favorite_color' is not defined
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
We get only the first failure.
We get only the first failure.
If we give any reporting options when we set up the tests,
If we give any reporting options when we set up the tests,
...
...
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