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

Fix tests for Sphinx 5.3.0 #865

Merged
merged 1 commit into from
Oct 29, 2022
Merged
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
12 changes: 11 additions & 1 deletion tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ def __init__(self, **kwargs):
WrappedDoxygenNode.__init__(self, compounddefTypeSub, **kwargs)


class MockMemo:
def __init__(self):
self.title_styles = ""
self.section_level = ""


class MockState:
def __init__(self, app):
from breathe.project import ProjectInfoFactory
Expand All @@ -123,7 +129,11 @@ def __init__(self, app):
settings.env = env
self.document = utils.new_document("", settings)

def nested_parse(self, content, content_offset, contentnode):
# In sphinx 5.3.0 the method state.nested_parse is not called directly
# so this memo object should exists here
self.memo = MockMemo()

def nested_parse(self, content, content_offset, contentnode, match_titles=1):
pass


Expand Down