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
b3f95d7f
Kaydet (Commit)
b3f95d7f
authored
Mar 21, 2012
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
üst
7c010ee0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
doctest.py
Lib/doctest.py
+7
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/doctest.py
Dosyayı görüntüle @
b3f95d7f
...
@@ -2314,7 +2314,8 @@ class DocTestCase(unittest.TestCase):
...
@@ -2314,7 +2314,8 @@ class DocTestCase(unittest.TestCase):
return
"Doctest: "
+
self
.
_dt_test
.
name
return
"Doctest: "
+
self
.
_dt_test
.
name
class
SkipDocTestCase
(
DocTestCase
):
class
SkipDocTestCase
(
DocTestCase
):
def
__init__
(
self
):
def
__init__
(
self
,
module
):
self
.
module
=
module
DocTestCase
.
__init__
(
self
,
None
)
DocTestCase
.
__init__
(
self
,
None
)
def
setUp
(
self
):
def
setUp
(
self
):
...
@@ -2324,7 +2325,10 @@ class SkipDocTestCase(DocTestCase):
...
@@ -2324,7 +2325,10 @@ class SkipDocTestCase(DocTestCase):
pass
pass
def
shortDescription
(
self
):
def
shortDescription
(
self
):
return
"Skipping tests from
%
s"
%
module
.
__name__
return
"Skipping tests from
%
s"
%
self
.
module
.
__name__
__str__
=
shortDescription
def
DocTestSuite
(
module
=
None
,
globs
=
None
,
extraglobs
=
None
,
test_finder
=
None
,
def
DocTestSuite
(
module
=
None
,
globs
=
None
,
extraglobs
=
None
,
test_finder
=
None
,
**
options
):
**
options
):
...
@@ -2372,7 +2376,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
...
@@ -2372,7 +2376,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
if
not
tests
and
sys
.
flags
.
optimize
>=
2
:
if
not
tests
and
sys
.
flags
.
optimize
>=
2
:
# Skip doctests when running with -O2
# Skip doctests when running with -O2
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
SkipDocTestCase
())
suite
.
addTest
(
SkipDocTestCase
(
module
))
return
suite
return
suite
elif
not
tests
:
elif
not
tests
:
# Why do we want to do this? Because it reveals a bug that might
# Why do we want to do this? Because it reveals a bug that might
...
...
Misc/NEWS
Dosyayı görüntüle @
b3f95d7f
...
@@ -27,6 +27,9 @@ Core and Builtins
...
@@ -27,6 +27,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
12757
:
Fix
the
skipping
of
doctests
when
python
is
run
with
-
OO
so
that
it
works
in
unittest
's verbose mode as well as non-verbose mode.
- Issue #3573: IDLE hangs when passing invalid command line args
- Issue #3573: IDLE hangs when passing invalid command line args
(directory(ies) instead of file(s)) (Patch by Guilherme Polo)
(directory(ies) instead of file(s)) (Patch by Guilherme Polo)
...
...
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