diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-04-10 00:32:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 00:32:26 +0900 |
commit | fe6d95e4294f47d61f1a04a1f8c6567c9802f504 (patch) | |
tree | 33a7143bf1dcf60830c2e1fcd4b396175af45e64 /tests/test_ext_autodoc_autofunction.py | |
parent | 7327e56dff865d4766c43d46405ae827e10fd6c3 (diff) | |
parent | ce5d66e618c111b115a9bb7b1401a26483fcfa8f (diff) | |
download | sphinx-git-fe6d95e4294f47d61f1a04a1f8c6567c9802f504.tar.gz |
Merge branch 'master' into patch-1
Diffstat (limited to 'tests/test_ext_autodoc_autofunction.py')
-rw-r--r-- | tests/test_ext_autodoc_autofunction.py | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/tests/test_ext_autodoc_autofunction.py b/tests/test_ext_autodoc_autofunction.py index aa0476687..615091889 100644 --- a/tests/test_ext_autodoc_autofunction.py +++ b/tests/test_ext_autodoc_autofunction.py @@ -9,8 +9,6 @@ :license: BSD, see LICENSE for details. """ -import sys - import pytest from .test_ext_autodoc import do_autodoc @@ -118,23 +116,16 @@ def test_decorated(app): def test_singledispatch(app): options = {} actual = do_autodoc(app, 'function', 'target.singledispatch.func', options) - if sys.version_info < (3, 6): - # check the result via "in" because the order of singledispatch signatures is - # usually changed (because dict is not OrderedDict yet!) - assert '.. py:function:: func(arg, kwarg=None)' in actual - assert ' func(arg: int, kwarg=None)' in actual - assert ' func(arg: str, kwarg=None)' in actual - else: - assert list(actual) == [ - '', - '.. py:function:: func(arg, kwarg=None)', - ' func(arg: int, kwarg=None)', - ' func(arg: str, kwarg=None)', - ' :module: target.singledispatch', - '', - ' A function for general use.', - '', - ] + assert list(actual) == [ + '', + '.. py:function:: func(arg, kwarg=None)', + ' func(arg: int, kwarg=None)', + ' func(arg: str, kwarg=None)', + ' :module: target.singledispatch', + '', + ' A function for general use.', + '', + ] @pytest.mark.sphinx('html', testroot='ext-autodoc') |