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

🧪 TESTS: Fix test failure with Sphinx 4.5 #542

Merged
merged 5 commits into from
Apr 13, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_renderers/fixtures/sphinx_roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ pep (`sphinx.roles.PEP`):
<paragraph>
<index entries="('single',\ 'Python\ Enhancement\ Proposals;\ PEP\ 1',\ 'index-0',\ '',\ None)">
<target ids="index-0">
<reference classes="pep" internal="False" refuri="http://www.python.org/dev/peps/pep-0001">
<reference classes="pep" internal="False" refuri="http://www.python.org/dev/peps/pep-0001/">
<strong>
PEP 1
.
Expand Down
6 changes: 6 additions & 0 deletions tests/test_renderers/test_fixtures_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def test_sphinx_roles(file_params):
actual = document.pformat()
# sphinx 3 adds a parent key
actual = re.sub('cpp:parent_key="[^"]*"', 'cpp:parent_key=""', actual)
# sphinx >= 4.5.0 adds a trailing slash to PEP URLs,
# see https://github.com/sphinx-doc/sphinx/commit/658689433eacc9eb
actual = actual.replace(
' refuri="http://www.python.org/dev/peps/pep-0001">',
' refuri="http://www.python.org/dev/peps/pep-0001/">',
)
file_params.assert_expected(actual, rstrip_lines=True)


Expand Down