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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃敡 TESTS: Fix for sphinx 4.4 #508

Merged
merged 1 commit into from Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_renderers/test_fixtures_sphinx.py
Expand Up @@ -47,8 +47,10 @@ def test_sphinx_directives(file_params):
pytest.skip(file_params.title)
elif file_params.title.startswith("SPHINX4") and sphinx.version_info[0] < 4:
pytest.skip(file_params.title)
document = to_docutils(file_params.content, in_sphinx_env=True)
file_params.assert_expected(document.pformat(), rstrip_lines=True)
document = to_docutils(file_params.content, in_sphinx_env=True).pformat()
# see https://github.com/sphinx-doc/sphinx/issues/9827
document = document.replace('<glossary sorted="False">', "<glossary>")
file_params.assert_expected(document, rstrip_lines=True)


@pytest.mark.param_file(FIXTURE_PATH / "sphinx_roles.md")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_sphinx/test_sphinx_builds.py
Expand Up @@ -531,6 +531,14 @@ def test_fieldlist_extension(
docname="index",
regress=True,
regress_ext=f".sphinx{sphinx.version_info[0]}.xml",
# changed in:
# https://www.sphinx-doc.org/en/master/changes.html#release-4-4-0-released-jan-17-2022
replace={
(
'<literal_strong py:class="True" '
'py:module="True" refspecific="True">'
): "<literal_strong>"
},
)
finally:
get_sphinx_app_output(
Expand Down
Expand Up @@ -37,7 +37,7 @@
<bullet_list>
<list_item>
<paragraph>
<literal_strong py:class="True" py:module="True" refspecific="True">
<literal_strong>
sender
(
<pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="str" reftype="class">
Expand All @@ -48,7 +48,7 @@
The person sending the message
<list_item>
<paragraph>
<literal_strong py:class="True" py:module="True" refspecific="True">
<literal_strong>
priority
(
<pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="int" reftype="class">
Expand Down
Expand Up @@ -37,7 +37,7 @@
<bullet_list>
<list_item>
<paragraph>
<literal_strong py:class="True" py:module="True" refspecific="True">
<literal_strong>
sender
(
<pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="str" reftype="class">
Expand All @@ -48,7 +48,7 @@
The person sending the message
<list_item>
<paragraph>
<literal_strong py:class="True" py:module="True" refspecific="True">
<literal_strong>
priority
(
<pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="int" reftype="class">
Expand Down