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.py27
1 files changed, 10 insertions, 17 deletions
diff --git a/tests/test_ext_autodoc_autofunction.py b/tests/test_ext_autodoc_autofunction.py
index c6a7af7c9..d5f690bad 100644
--- a/tests/test_ext_autodoc_autofunction.py
+++ b/tests/test_ext_autodoc_autofunction.py
@@ -117,23 +117,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')