2013-12-26 23:23:47 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
test_templating
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Test templating.
|
|
|
|
|
2016-01-14 15:54:04 -06:00
|
|
|
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
|
2013-12-26 23:23:47 -06:00
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
|
|
|
|
2014-09-21 10:17:02 -05:00
|
|
|
from util import with_app
|
2013-12-26 23:23:47 -06:00
|
|
|
|
|
|
|
|
2014-09-21 10:17:02 -05:00
|
|
|
@with_app('html', testroot='templating')
|
|
|
|
def test_layout_overloading(app, status, warning):
|
|
|
|
app.builder.build_update()
|
2013-12-26 23:23:47 -06:00
|
|
|
|
|
|
|
result = (app.outdir / 'contents.html').text(encoding='utf-8')
|
|
|
|
|
|
|
|
assert '<!-- layout overloading -->' in result
|
|
|
|
|
|
|
|
|
2014-09-21 10:17:02 -05:00
|
|
|
@with_app('html', testroot='templating')
|
|
|
|
def test_autosummary_class_template_overloading(app, status, warning):
|
|
|
|
app.builder.build_update()
|
2013-12-26 23:23:47 -06:00
|
|
|
|
2014-09-21 10:17:02 -05:00
|
|
|
result = (app.outdir / 'generated' / 'sphinx.application.TemplateBridge.html').text(
|
|
|
|
encoding='utf-8')
|
2013-12-26 23:23:47 -06:00
|
|
|
|
|
|
|
assert 'autosummary/class.rst method block overloading' in result
|