Add testcase for PR #2311

This commit is contained in:
Takeshi KOMIYA
2016-02-14 15:06:28 +09:00
parent 72b36c1888
commit 492980c23e
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
extensions = ['sphinx.ext.inheritance_diagram']
master_doc = 'index'

View File

@@ -0,0 +1,5 @@
============================
test-ext-inheritance_diagram
============================
.. inheritance-diagram:: test.Foo

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
class Foo(object):
pass
class Bar(Foo):
pass
class Baz(Bar):
pass
class Qux(Foo):
pass

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
"""
test_ext_inheritance_diagram
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test sphinx.ext.inheritance_diagram extension.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from util import with_app
@with_app('html', testroot='ext-inheritance_diagram')
def test_inheritance_diagram_html(app, status, warning):
app.builder.build_all()