mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add testcase for PR #2311
This commit is contained in:
9
tests/roots/test-ext-inheritance_diagram/conf.py
Normal file
9
tests/roots/test-ext-inheritance_diagram/conf.py
Normal 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'
|
||||
5
tests/roots/test-ext-inheritance_diagram/index.rst
Normal file
5
tests/roots/test-ext-inheritance_diagram/index.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
============================
|
||||
test-ext-inheritance_diagram
|
||||
============================
|
||||
|
||||
.. inheritance-diagram:: test.Foo
|
||||
17
tests/roots/test-ext-inheritance_diagram/test.py
Normal file
17
tests/roots/test-ext-inheritance_diagram/test.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
class Foo(object):
|
||||
pass
|
||||
|
||||
|
||||
class Bar(Foo):
|
||||
pass
|
||||
|
||||
|
||||
class Baz(Bar):
|
||||
pass
|
||||
|
||||
|
||||
class Qux(Foo):
|
||||
pass
|
||||
17
tests/test_ext_inheritance_diagram.py
Normal file
17
tests/test_ext_inheritance_diagram.py
Normal 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()
|
||||
Reference in New Issue
Block a user