summaryrefslogtreecommitdiff
path: root/tests/test_ext_autodoc_autofunction.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ext_autodoc_autofunction.py')
-rw-r--r--tests/test_ext_autodoc_autofunction.py29
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')