summaryrefslogtreecommitdiff
path: root/tests/test_templating.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-01-18 20:41:43 +0900
committershimizukawa <shimizukawa@gmail.com>2014-01-18 20:41:43 +0900
commitdc62e8d7ea844a4b2ac7bd880d2d3966deebb207 (patch)
tree76ea87ca4e9a71f1262724673d1654f03e08c117 /tests/test_templating.py
parent22bff8279d4d2d0096152337ae2b6b3951f92e29 (diff)
parent39287f95535866e2d4d1544f8688ce22fd19a69a (diff)
downloadsphinx-dc62e8d7ea844a4b2ac7bd880d2d3966deebb207.tar.gz
merge heads
Diffstat (limited to 'tests/test_templating.py')
-rw-r--r--tests/test_templating.py36
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
+