mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Document `typing.NewType` as a class (#10700)
This commit is contained in:
@@ -151,36 +151,6 @@ def test_autoattribute_GenericAlias(app):
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_autoattribute_NewType(app):
|
||||
actual = do_autodoc(app, 'attribute', 'target.typevar.Class.T6')
|
||||
assert list(actual) == [
|
||||
'',
|
||||
'.. py:attribute:: Class.T6',
|
||||
' :module: target.typevar',
|
||||
'',
|
||||
' T6',
|
||||
'',
|
||||
' alias of :py:class:`~datetime.date`',
|
||||
'',
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_autoattribute_TypeVar(app):
|
||||
actual = do_autodoc(app, 'attribute', 'target.typevar.Class.T1')
|
||||
assert list(actual) == [
|
||||
'',
|
||||
'.. py:attribute:: Class.T1',
|
||||
' :module: target.typevar',
|
||||
'',
|
||||
' T1',
|
||||
'',
|
||||
" alias of TypeVar('T1')",
|
||||
'',
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_autoattribute_hide_value(app):
|
||||
actual = do_autodoc(app, 'attribute', 'target.hide_value.Foo.SENTINEL1')
|
||||
|
||||
Reference in New Issue
Block a user