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

Adapt to Sphinx 1.8 #410

Merged
merged 2 commits into from
Jan 23, 2019
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: python

env:
- SPHINX_VERSION=1.7.5 TRAVIS_CI=True
- SPHINX_VERSION=1.8.3 TRAVIS_CI=True

python:
- "2.7"
Expand Down
20 changes: 15 additions & 5 deletions tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from breathe.renderer.sphinxrenderer import SphinxRenderer
from breathe.renderer.filter import OpenFilter
from docutils import frontend, nodes, parsers, utils
from sphinx.config import Config
from sphinx.domains.cpp import CPPDomain
from sphinx.domains.c import CDomain

Expand Down Expand Up @@ -53,17 +54,26 @@ class TestParam(paramTypeSub, TestDoxygenNode):
def __init__(self, **kwargs):
TestDoxygenNode.__init__(self, paramTypeSub, **kwargs)

class MockConfig(object):
cpp_id_attributes = []
cpp_paren_attributes = []
cpp_index_common_prefix = []

class MockRegistry(object):
def get_envversion(self, app):
return None

def create_domains(self, env):
return []


class MockApp(object):
def __init__(self):
self.doctreedir = None
self.srcdir = None
self.config = MockConfig()
self.config = Config()
self.config.pre_init_values()
self.config.init_values()
self.config.add('cpp_id_attributes', [], 'env', ())
self.config.add('cpp_paren_attributes', [], 'env', ())
self.config.add('cpp_index_common_prefix', [], 'env', ())
self.registry = MockRegistry()


class MockState:
Expand Down