diff options
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' ' |