mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Drop features and APIs deprecated in 1.8
This commit is contained in:
@@ -61,20 +61,13 @@ def test_extension_in_blacklist(app, status, warning):
|
||||
|
||||
|
||||
@pytest.mark.sphinx(testroot='add_source_parser')
|
||||
@pytest.mark.filterwarnings('ignore:The config variable "source_parsers"')
|
||||
@pytest.mark.filterwarnings('ignore:app.add_source_parser\\(\\) does not support suffix')
|
||||
def test_add_source_parser(app, status, warning):
|
||||
assert set(app.config.source_suffix) == {'.rst', '.md', '.test'}
|
||||
assert set(app.config.source_suffix) == {'.rst', '.test'}
|
||||
|
||||
# .rst; only in :confval:`source_suffix`
|
||||
assert '.rst' not in app.registry.get_source_parsers()
|
||||
assert app.registry.source_suffix['.rst'] is None
|
||||
|
||||
# .md; configured by :confval:`source_suffix` and :confval:`source_parsers`
|
||||
assert '.md' in app.registry.get_source_parsers()
|
||||
assert app.registry.source_suffix['.md'] == '.md'
|
||||
assert app.registry.get_source_parsers()['.md'].__name__ == 'DummyMarkdownParser'
|
||||
|
||||
# .test; configured by API
|
||||
assert app.registry.source_suffix['.test'] == 'test'
|
||||
assert 'test' in app.registry.get_source_parsers()
|
||||
|
||||
Reference in New Issue
Block a user