summaryrefslogtreecommitdiff
path: root/tests/test_templating.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_templating.py')
-rw-r--r--tests/test_templating.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_templating.py b/tests/test_templating.py
index becacda0d..f2c1d563b 100644
--- a/tests/test_templating.py
+++ b/tests/test_templating.py
@@ -33,3 +33,17 @@ def test_autosummary_class_template_overloading(make_app, app_params):
result = (app.outdir / 'generated' / 'sphinx.application.TemplateBridge.html').read_text()
assert 'autosummary/class.rst method block overloading' in result
+ assert 'foobar' not in result
+
+
+@pytest.mark.sphinx('html', testroot='templating',
+ confoverrides={'autosummary_context': {'sentence': 'foobar'}})
+def test_autosummary_context(make_app, app_params):
+ args, kwargs = app_params
+ app = make_app(*args, **kwargs)
+ setup_documenters(app)
+ app.builder.build_update()
+
+ result = (app.outdir / 'generated' / 'sphinx.application.TemplateBridge.html').read_text()
+ assert 'autosummary/class.rst method block overloading' in result
+ assert 'foobar' in result