Skip to content

Commit

Permalink
🔧 TESTS: Fix for sphinx 4.4 (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Jan 19, 2022
1 parent ee5ff3b commit 7654462
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
6 changes: 4 additions & 2 deletions tests/test_renderers/test_fixtures_sphinx.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 7654462

Please sign in to comment.