Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Mark pytest module #8220

Merged
merged 1 commit into from
Jan 5, 2021
Merged

DOC: Mark pytest module #8220

merged 1 commit into from
Jan 5, 2021

Conversation

xuhdev
Copy link
Contributor

@xuhdev xuhdev commented Jan 2, 2021

Pytest document currently does not index the top-level package name
pytest, which causes some trouble when building documentation that
cross-refers to the pytest package via :mod:`pytest` .

Reference: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#role-py-mod

Pytest document currently does not index the top-level package name
`pytest`, which causes some trouble when building documentation that
cross-refers to the pytest package via ``:mod:`pytest` ``.
@nicoddemus
Copy link
Member

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @xuhdev!

@nicoddemus nicoddemus merged commit 329fff6 into pytest-dev:master Jan 5, 2021
@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Jan 5, 2021
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 5, 2021
@nicoddemus
Copy link
Member

Backport: #8224

@nicoddemus nicoddemus added backported and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Jan 5, 2021
@xuhdev xuhdev deleted the module-doc branch January 5, 2021 19:13
@QuLogic
Copy link

QuLogic commented Jan 26, 2021

It seems like this added an extra pytest in the intersphinx for marks:

python3 -m sphinx.ext.intersphinx https://pytest.org/en/latest/objects.inv | rg -e '^py' -e '\.mark\.'
py:attribute
py:class
py:exception
py:function
	pytest.pytest.mark.filterwarnings        reference.html#pytest.pytest.mark.filterwarnings
	pytest.pytest.mark.skip                  reference.html#pytest.pytest.mark.skip
	pytest.pytest.mark.skipif                reference.html#pytest.pytest.mark.skipif
	pytest.pytest.mark.usefixtures           reference.html#pytest.pytest.mark.usefixtures
	pytest.pytest.mark.xfail                 reference.html#pytest.pytest.mark.xfail
py:method
py:module
	@pytest.mark.parametrize                 @pytest.mark.parametrize: parametrizing test functions: parametrize.html#pytest-mark-parametrize
	filterwarnings                           @pytest.mark.filterwarnings             : warnings.html#filterwarnings
	parametrizemark                          @pytest.mark.parametrize: parametrizing test functions: parametrize.html#parametrizemark
	pytest.mark.filterwarnings ref           pytest.mark.filterwarnings              : reference.html#pytest-mark-filterwarnings-ref
	pytest.mark.parametrize ref              pytest.mark.parametrize                 : reference.html#pytest-mark-parametrize-ref
	pytest.mark.skip ref                     pytest.mark.skip                        : reference.html#pytest-mark-skip-ref
	pytest.mark.skipif ref                   pytest.mark.skipif                      : reference.html#pytest-mark-skipif-ref
	pytest.mark.usefixtures ref              pytest.mark.usefixtures                 : reference.html#pytest-mark-usefixtures-ref
	pytest.mark.xfail ref                    pytest.mark.xfail                       : reference.html#pytest-mark-xfail-ref

whereas previously, a singular pytest was there:

python3 -m sphinx.ext.intersphinx https://pytest.org/en/4.6.x/objects.inv | rg -e '^py' -e '\.mark\.'
py:attribute
	_pytest.mark.MarkDecorator.args          reference.html#_pytest.mark.MarkDecorator.args
	_pytest.mark.MarkDecorator.kwargs        reference.html#_pytest.mark.MarkDecorator.kwargs
	_pytest.mark.MarkDecorator.name          reference.html#_pytest.mark.MarkDecorator.name
	_pytest.mark.structures.Mark.args        reference.html#_pytest.mark.structures.Mark.args
	_pytest.mark.structures.Mark.kwargs      reference.html#_pytest.mark.structures.Mark.kwargs
	_pytest.mark.structures.Mark.name        reference.html#_pytest.mark.structures.Mark.name
py:class
	_pytest.mark.MarkDecorator               reference.html#_pytest.mark.MarkDecorator
	_pytest.mark.MarkGenerator               reference.html#_pytest.mark.MarkGenerator
	_pytest.mark.structures.Mark             reference.html#_pytest.mark.structures.Mark
py:exception
py:function
	pytest.mark.filterwarnings               reference.html#pytest.mark.filterwarnings
	pytest.mark.skip                         reference.html#pytest.mark.skip
	pytest.mark.skipif                       reference.html#pytest.mark.skipif
	pytest.mark.usefixtures                  reference.html#pytest.mark.usefixtures
	pytest.mark.xfail                        reference.html#pytest.mark.xfail
py:method
	_pytest.mark.MarkDecorator.with_args     reference.html#_pytest.mark.MarkDecorator.with_args
	_pytest.mark.structures.Mark.combined_with reference.html#_pytest.mark.structures.Mark.combined_with
	@pytest.mark.parametrize                 @pytest.mark.parametrize: parametrizing test functions: parametrize.html#pytest-mark-parametrize
	filterwarnings                           @pytest.mark.filterwarnings             : warnings.html#filterwarnings
	parametrizemark                          @pytest.mark.parametrize: parametrizing test functions: parametrize.html#parametrizemark
	pytest.mark.filterwarnings ref           pytest.mark.filterwarnings              : reference.html#pytest-mark-filterwarnings-ref
	pytest.mark.parametrize ref              pytest.mark.parametrize                 : reference.html#pytest-mark-parametrize-ref
	pytest.mark.skip ref                     pytest.mark.skip                        : reference.html#pytest-mark-skip-ref
	pytest.mark.skipif ref                   pytest.mark.skipif                      : reference.html#pytest-mark-skipif-ref
	pytest.mark.usefixtures ref              pytest.mark.usefixtures                 : reference.html#pytest-mark-usefixtures-ref
	pytest.mark.xfail ref                    pytest.mark.xfail                       : reference.html#pytest-mark-xfail-ref

@xuhdev
Copy link
Contributor Author

xuhdev commented Jan 26, 2021

@QuLogic Thanks for the catch. #8280 should have fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants