diff options
-rw-r--r-- | tests/roots/test-ext-inheritance_diagram/conf.py | 9 | ||||
-rw-r--r-- | tests/roots/test-ext-inheritance_diagram/index.rst | 5 | ||||
-rw-r--r-- | tests/roots/test-ext-inheritance_diagram/test.py | 17 | ||||
-rw-r--r-- | tests/test_ext_inheritance_diagram.py | 17 |
4 files changed, 48 insertions, 0 deletions
diff --git a/tests/roots/test-ext-inheritance_diagram/conf.py b/tests/roots/test-ext-inheritance_diagram/conf.py new file mode 100644 index 000000000..18680c1d9 --- /dev/null +++ b/tests/roots/test-ext-inheritance_diagram/conf.py @@ -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' diff --git a/tests/roots/test-ext-inheritance_diagram/index.rst b/tests/roots/test-ext-inheritance_diagram/index.rst new file mode 100644 index 000000000..876996ca8 --- /dev/null +++ b/tests/roots/test-ext-inheritance_diagram/index.rst @@ -0,0 +1,5 @@ +============================ +test-ext-inheritance_diagram +============================ + +.. inheritance-diagram:: test.Foo diff --git a/tests/roots/test-ext-inheritance_diagram/test.py b/tests/roots/test-ext-inheritance_diagram/test.py new file mode 100644 index 000000000..32f7f273c --- /dev/null +++ b/tests/roots/test-ext-inheritance_diagram/test.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + + +class Foo(object): + pass + + +class Bar(Foo): + pass + + +class Baz(Bar): + pass + + +class Qux(Foo): + pass diff --git a/tests/test_ext_inheritance_diagram.py b/tests/test_ext_inheritance_diagram.py new file mode 100644 index 000000000..64446eed8 --- /dev/null +++ b/tests/test_ext_inheritance_diagram.py @@ -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() |