diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-14 16:55:36 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-14 16:56:03 +0100 |
commit | 3ab0b6dada9c04a0243627e70069563ebc7ec8c3 (patch) | |
tree | 1d7e08f3859bbdf22931e85738ddfab038e5df1f /rtemsspec/tests/test_content_sphinx.py | |
parent | items: Fix ItemCache construction (diff) | |
download | rtems-central-3ab0b6dada9c04a0243627e70069563ebc7ec8c3.tar.bz2 |
items: Improve substitution error messages
Diffstat (limited to 'rtemsspec/tests/test_content_sphinx.py')
-rw-r--r-- | rtemsspec/tests/test_content_sphinx.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rtemsspec/tests/test_content_sphinx.py b/rtemsspec/tests/test_content_sphinx.py index 70ed6226..e45703a9 100644 --- a/rtemsspec/tests/test_content_sphinx.py +++ b/rtemsspec/tests/test_content_sphinx.py @@ -276,7 +276,8 @@ def test_substitute(tmpdir): with_spec_types=True) item_cache = ItemCache(config) mapper = SphinxMapper(item_cache["/x"]) - with pytest.raises(KeyError): + match = r"substitution for spec:/x using prefix '' failed for text: \${x:/y}" + with pytest.raises(ValueError, match=match): mapper.substitute("${x:/y}") assert mapper.substitute("${x:/term}") == ":term:`y`" assert mapper.substitute("${x:/plural}") == ":term:`ys <y>`" |