mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '3.3.x' into 3.x
This commit is contained in:
commit
2be6aaa7a4
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@ -8,8 +8,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: [py36, py37]
|
name: [py35, py36, py37]
|
||||||
include:
|
include:
|
||||||
|
- name: py35
|
||||||
|
python: 3.5
|
||||||
|
docutils: du12
|
||||||
- name: py36
|
- name: py36
|
||||||
python: 3.6
|
python: 3.6
|
||||||
docutils: du13
|
docutils: du13
|
||||||
|
@ -11,9 +11,6 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- python: '3.5'
|
|
||||||
env:
|
|
||||||
- TOXENV=du12
|
|
||||||
- python: '3.8'
|
- python: '3.8'
|
||||||
env:
|
env:
|
||||||
- TOXENV=du15
|
- TOXENV=du15
|
||||||
|
@ -1832,6 +1832,13 @@ def test_autodoc_for_egged_code(app):
|
|||||||
def test_singledispatch(app):
|
def test_singledispatch(app):
|
||||||
options = {"members": None}
|
options = {"members": None}
|
||||||
actual = do_autodoc(app, 'module', 'target.singledispatch', options)
|
actual = do_autodoc(app, 'module', 'target.singledispatch', 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) == [
|
assert list(actual) == [
|
||||||
'',
|
'',
|
||||||
'.. py:module:: target.singledispatch',
|
'.. py:module:: target.singledispatch',
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from test_ext_autodoc import do_autodoc
|
from test_ext_autodoc import do_autodoc
|
||||||
@ -108,6 +110,13 @@ def test_decorated(app):
|
|||||||
def test_singledispatch(app):
|
def test_singledispatch(app):
|
||||||
options = {}
|
options = {}
|
||||||
actual = do_autodoc(app, 'function', 'target.singledispatch.func', 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) == [
|
assert list(actual) == [
|
||||||
'',
|
'',
|
||||||
'.. py:function:: func(arg, kwarg=None)',
|
'.. py:function:: func(arg, kwarg=None)',
|
||||||
|
Loading…
Reference in New Issue
Block a user