Skip to content

Commit

Permalink
Fix tests for Sphinx 5.3.0
Browse files Browse the repository at this point in the history
Fix #863
  • Loading branch information
danigm committed Oct 28, 2022
1 parent a94ae67 commit de3504c
Showing 1 changed file with 11 additions and 1 deletion.
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

0 comments on commit de3504c

Please sign in to comment.