diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-04-28 01:42:37 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-04-28 01:42:37 +0900 |
commit | aa773cbc88e692df731c78353a1043201bcb9f91 (patch) | |
tree | 2e5fc2c4659d73333a01f2a2c1c00420d98a801f /tests/test_templating.py | |
parent | bee44bedb100d325e4e9dad681521819bd774f5f (diff) | |
parent | ba47b7055b03050ed7d7803cb0d1c7a335646ecf (diff) | |
download | sphinx-git-aa773cbc88e692df731c78353a1043201bcb9f91.tar.gz |
Merge branch '3.x'
Diffstat (limited to 'tests/test_templating.py')
-rw-r--r-- | tests/test_templating.py | 14 |
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 |