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
b532df62
Kaydet (Commit)
b532df62
authored
Ara 08, 2014
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21740: Support wrapped callables in pydoc. Patch by Claudiu Popa.
üst
a49d6a21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
doctest.py
Lib/doctest.py
+2
-1
test_doctest.py
Lib/test/test_doctest.py
+18
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/doctest.py
Dosyayı görüntüle @
b532df62
...
@@ -985,7 +985,8 @@ class DocTestFinder:
...
@@ -985,7 +985,8 @@ class DocTestFinder:
for
valname
,
val
in
obj
.
__dict__
.
items
():
for
valname
,
val
in
obj
.
__dict__
.
items
():
valname
=
'
%
s.
%
s'
%
(
name
,
valname
)
valname
=
'
%
s.
%
s'
%
(
name
,
valname
)
# Recurse to functions & classes.
# Recurse to functions & classes.
if
((
inspect
.
isroutine
(
val
)
or
inspect
.
isclass
(
val
))
and
if
((
inspect
.
isroutine
(
inspect
.
unwrap
(
val
))
or
inspect
.
isclass
(
val
))
and
self
.
_from_module
(
module
,
val
)):
self
.
_from_module
(
module
,
val
)):
self
.
_find
(
tests
,
val
,
valname
,
module
,
source_lines
,
self
.
_find
(
tests
,
val
,
valname
,
module
,
source_lines
,
globs
,
seen
)
globs
,
seen
)
...
...
Lib/test/test_doctest.py
Dosyayı görüntüle @
b532df62
...
@@ -4,6 +4,7 @@ Test script for doctest.
...
@@ -4,6 +4,7 @@ Test script for doctest.
from
test
import
support
from
test
import
support
import
doctest
import
doctest
import
functools
import
os
import
os
import
sys
import
sys
...
@@ -434,7 +435,7 @@ We'll simulate a __file__ attr that ends in pyc:
...
@@ -434,7 +435,7 @@ We'll simulate a __file__ attr that ends in pyc:
>>> tests = finder.find(sample_func)
>>> tests = finder.find(sample_func)
>>> print(tests) # doctest: +ELLIPSIS
>>> print(tests) # doctest: +ELLIPSIS
[<DocTest sample_func from ...:1
8
(1 example)>]
[<DocTest sample_func from ...:1
9
(1 example)>]
The exact name depends on how test_doctest was invoked, so allow for
The exact name depends on how test_doctest was invoked, so allow for
leading path components.
leading path components.
...
@@ -2364,6 +2365,22 @@ def test_trailing_space_in_test():
...
@@ -2364,6 +2365,22 @@ def test_trailing_space_in_test():
foo
\n
foo
\n
"""
"""
class
Wrapper
:
def
__init__
(
self
,
func
):
self
.
func
=
func
functools
.
update_wrapper
(
self
,
func
)
def
__call__
(
self
,
*
args
,
**
kwargs
):
self
.
func
(
*
args
,
**
kwargs
)
@Wrapper
def
test_look_in_unwrapped
():
"""
Docstrings in wrapped functions must be detected as well.
>>> 'one other test'
'one other test'
"""
def
test_unittest_reportflags
():
def
test_unittest_reportflags
():
"""Default unittest reporting flags can be set to control reporting
"""Default unittest reporting flags can be set to control reporting
...
...
Misc/NEWS
Dosyayı görüntüle @
b532df62
...
@@ -194,6 +194,8 @@ Core and Builtins
...
@@ -194,6 +194,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
21740
:
Support
wrapped
callables
in
pydoc
.
Patch
by
Claudiu
Popa
.
-
Issue
#
23009
:
Make
sure
selectors
.
EpollSelecrtor
.
select
()
works
when
no
-
Issue
#
23009
:
Make
sure
selectors
.
EpollSelecrtor
.
select
()
works
when
no
FD
is
registered
.
FD
is
registered
.
...
...
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