Skip to content

Commit

Permalink
馃И TESTS: Fix test failure with Sphinx 4.5 (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya57 committed Apr 13, 2022
1 parent 57f7543 commit c9c4f3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit c9c4f3b

Please sign in to comment.