diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-16 00:32:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-16 00:32:10 +0900 |
commit | c70e65fc6cd04d02df4f7911025f534dbd27cc20 (patch) | |
tree | 1e8614ac5516dace99ef1df4d203081662c7c2d6 /tests/test_autodoc.py | |
parent | d6d4406ce987cc8823d1b3a33be3a418bcd2a59d (diff) | |
parent | 79eec90f36f5a74e24cfd6740126396fd6567e07 (diff) | |
download | sphinx-git-c70e65fc6cd04d02df4f7911025f534dbd27cc20.tar.gz |
Merge branch 'master' into 5770_doctest_refers_highlight_language
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index feaab19f4..4fd353dc1 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1028,16 +1028,13 @@ def test_autodoc_member_order(app): @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_autodoc_module_scope(app): - def convert(s): - return re.sub('<.*>', '<FILTERED>', s) # for py2/py3 - app.env.temp_data['autodoc:module'] = 'target' actual = do_autodoc(app, 'attribute', 'Class.mdocattr') - assert list(map(convert, actual)) == [ + assert list(actual) == [ u'', u'.. py:attribute:: Class.mdocattr', u' :module: target', - u' :annotation: = <FILTERED>', + u' :annotation: = <_io.StringIO object>', u'', u' should be documented as well - süß', u' ' @@ -1046,17 +1043,14 @@ def test_autodoc_module_scope(app): @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_autodoc_class_scope(app): - def convert(s): - return re.sub('<.*>', '<FILTERED>', s) # for py2/py3 - app.env.temp_data['autodoc:module'] = 'target' app.env.temp_data['autodoc:class'] = 'Class' actual = do_autodoc(app, 'attribute', 'mdocattr') - assert list(map(convert, actual)) == [ + assert list(actual) == [ u'', u'.. py:attribute:: Class.mdocattr', u' :module: target', - u' :annotation: = <FILTERED>', + u' :annotation: = <_io.StringIO object>', u'', u' should be documented as well - süß', u' ' |