mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 09:00:00 -06:00
Merge branch '2.x' into 3.0.x
This commit is contained in:
commit
231d75b0d0
5 files changed
+78
-41
No files matched your search
@@ -0,0 +1,8 @@
|
||||
# for py32 or above
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def slow_function(message, timeout):
|
||||
"""This function is slow."""
|
||||
print(message)
|
||||
@@ -1413,6 +1413,19 @@ def test_partialmethod(app):
|
||||
assert list(actual) == expected
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_wrappedfunction(app):
|
||||
actual = do_autodoc(app, 'function', 'target.wrappedfunction.slow_function')
|
||||
assert list(actual) == [
|
||||
'',
|
||||
'.. py:function:: slow_function(message, timeout)',
|
||||
' :module: target.wrappedfunction',
|
||||
'',
|
||||
' This function is slow.',
|
||||
' ',
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_partialmethod_undoc_members(app):
|
||||
expected = [
|
||||
|
||||
Reference in new issue
Block a user