diff options
author | shimizukawa <shimizukawa@gmail.com> | 2013-12-27 05:23:47 +0000 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2013-12-27 05:23:47 +0000 |
commit | 3c84304044fb4f1ec6e02feff94b677628970486 (patch) | |
tree | 981d5f846ed151c4e15f90c77f645d3f7b5501fc /tests/test_templating.py | |
parent | aaaf4aeee90e88fdcd87ed3d1c63a2d8a0181086 (diff) | |
download | sphinx-3c84304044fb4f1ec6e02feff94b677628970486.tar.gz |
Fix autosummary template overloading cause infinite recursive function call. Closes #1335
Diffstat (limited to 'tests/test_templating.py')
-rw-r--r-- | tests/test_templating.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/test_templating.py b/tests/test_templating.py new file mode 100644 index 00000000..025d6fd0 --- /dev/null +++ b/tests/test_templating.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +""" + test_templating + ~~~~~~~~~~~~~~~~ + + Test templating. + + :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from util import test_roots, with_app + + +def teardown_module(): + (test_roots / 'test-templating' / '_build').rmtree(True), + + +@with_app(buildername='html', srcdir=(test_roots / 'test-templating')) +def test_layout_overloading(app): + app.builder.build_all() + + result = (app.outdir / 'contents.html').text(encoding='utf-8') + + assert '<!-- layout overloading -->' in result + + +@with_app(buildername='html', srcdir=(test_roots / 'test-templating')) +def test_autosummary_class_template_overloading(app): + app.builder.build_all() + + result = (app.outdir / 'generated' / 'sphinx.application.Sphinx.html').text( + encoding='utf-8') + + assert 'autosummary/class.rst method block overloading' in result + |