diff options
Diffstat (limited to 'tests/test_ext_autodoc_autoattribute.py')
-rw-r--r-- | tests/test_ext_autodoc_autoattribute.py | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/tests/test_ext_autodoc_autoattribute.py b/tests/test_ext_autodoc_autoattribute.py index 1c575760f..02443e6c7 100644 --- a/tests/test_ext_autodoc_autoattribute.py +++ b/tests/test_ext_autodoc_autoattribute.py @@ -4,8 +4,6 @@ This tests mainly the Documenters; the auto directives are tested in a test source file translated by test_build. """ -import sys - import pytest from .test_ext_autodoc import do_autodoc @@ -141,27 +139,16 @@ def test_autoattribute_slots_variable_str(app): @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_autoattribute_GenericAlias(app): actual = do_autodoc(app, 'attribute', 'target.genericalias.Class.T') - if sys.version_info < (3, 7): - assert list(actual) == [ - '', - '.. py:attribute:: Class.T', - ' :module: target.genericalias', - ' :value: typing.List[int]', - '', - ' A list of int', - '', - ] - else: - assert list(actual) == [ - '', - '.. py:attribute:: Class.T', - ' :module: target.genericalias', - '', - ' A list of int', - '', - ' alias of :py:class:`~typing.List`\\ [:py:class:`int`]', - '', - ] + assert list(actual) == [ + '', + '.. py:attribute:: Class.T', + ' :module: target.genericalias', + '', + ' A list of int', + '', + ' alias of :py:class:`~typing.List`\\ [:py:class:`int`]', + '', + ] @pytest.mark.sphinx('html', testroot='ext-autodoc') |