Skip to content

Commit

Permalink
Merge pull request #7652 from tk0miya/refactor_test_ext_autodoc
Browse files Browse the repository at this point in the history
Fix test_ext_autodoc: Set testroot to testcases
  • Loading branch information
tk0miya committed May 10, 2020
2 parents cfadd5f + caddd3a commit 1771bbb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_ext_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ def test_automethod_for_builtin(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_abstractmethods(app):
options = {"members": None,
"undoc-members": None}
Expand Down Expand Up @@ -1304,6 +1305,7 @@ def test_abstractmethods(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_partialfunction(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.partialfunction', options)
Expand Down Expand Up @@ -1338,6 +1340,7 @@ def test_partialfunction(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_imported_partialfunction_should_not_shown_without_imported_members(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.imported_members', options)
Expand All @@ -1348,6 +1351,7 @@ def test_imported_partialfunction_should_not_shown_without_imported_members(app)
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_bound_method(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.bound_method', options)
Expand All @@ -1364,6 +1368,7 @@ def test_bound_method(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_coroutine(app):
actual = do_autodoc(app, 'function', 'target.functions.coroutinefunc')
assert list(actual) == [
Expand Down Expand Up @@ -1620,6 +1625,7 @@ def test_autodoc_for_egged_code(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_singledispatch(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.singledispatch', options)
Expand All @@ -1638,6 +1644,7 @@ def test_singledispatch(app):
]


@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_singledispatch_autofunction(app):
options = {}
actual = do_autodoc(app, 'function', 'target.singledispatch.func', options)
Expand All @@ -1655,6 +1662,7 @@ def test_singledispatch_autofunction(app):

@pytest.mark.skipif(sys.version_info < (3, 8),
reason='singledispatchmethod is available since python3.8')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_singledispatchmethod(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.singledispatchmethod', options)
Expand All @@ -1681,6 +1689,7 @@ def test_singledispatchmethod(app):

@pytest.mark.skipif(sys.version_info < (3, 8),
reason='singledispatchmethod is available since python3.8')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_singledispatchmethod_automethod(app):
options = {}
actual = do_autodoc(app, 'method', 'target.singledispatchmethod.Foo.meth', options)
Expand All @@ -1697,6 +1706,7 @@ def test_singledispatchmethod_automethod(app):


@pytest.mark.skipif(pyximport is None, reason='cython is not installed')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_cython(app):
options = {"members": None,
"undoc-members": None}
Expand Down Expand Up @@ -1728,6 +1738,7 @@ def test_cython(app):

@pytest.mark.skipif(sys.version_info < (3, 8),
reason='typing.final is available since python3.8')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_final(app):
options = {"members": None}
actual = do_autodoc(app, 'module', 'target.final', options)
Expand Down

0 comments on commit 1771bbb

Please sign in to comment.