kopia lustrzana https://github.com/simonw/datasette
Test that ensures all config options are documented
rodzic
08029a2f8f
commit
a6afc21aba
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
Tests to ensure certain things are documented.
|
||||
"""
|
||||
from datasette import app
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
import re
|
||||
|
||||
markdown = (Path(__file__).parent.parent / 'docs' / 'config.rst').open().read()
|
||||
setting_heading_re = re.compile(r'(\w+)\n\-+\n')
|
||||
setting_headings = set(setting_heading_re.findall(markdown))
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', app.CONFIG_OPTIONS)
|
||||
def test_config_options_are_documented(config):
|
||||
assert config.name in setting_headings
|
Ładowanie…
Reference in New Issue