mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #7850: autodoc: KeyError is raised for invalid mark up
This commit is contained in:
@@ -13,6 +13,8 @@ import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from sphinx.testing import restructuredtext
|
||||
|
||||
from test_ext_autodoc import do_autodoc
|
||||
|
||||
IS_PYPY = platform.python_implementation() == 'PyPy'
|
||||
@@ -633,6 +635,12 @@ def test_autodoc_typehints_description(app):
|
||||
in context)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('text', testroot='ext-autodoc',
|
||||
confoverrides={'autodoc_typehints': "description"})
|
||||
def test_autodoc_typehints_description_for_invalid_node(app):
|
||||
text = ".. py:function:: hello; world"
|
||||
restructuredtext.parse(app, text) # raises no error
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='ext-autodoc')
|
||||
def test_autodoc_default_options(app):
|
||||
|
Reference in New Issue
Block a user