import pytest @pytest.mark.sphinx( 'html', testroot='root', confoverrides={'option_emphasise_placeholders': True}, ) def test_option_emphasise_placeholders(app): app.build() content = (app.outdir / 'objects.html').read_text(encoding='utf8') assert 'TYPE' in content assert '{TYPE}' not in content assert ( 'WHERE' '-' 'COUNT' ) in content assert '{{value}}' in content assert ( '--plugin.option' '' ) in content @pytest.mark.sphinx('html', testroot='root') def test_option_emphasise_placeholders_default(app): app.build() content = (app.outdir / 'objects.html').read_text(encoding='utf8') assert '={TYPE}' in content assert '={WHERE}-{COUNT}' in content assert '{client_name}' in content assert ( '--plugin.option' '' '' ) in content @pytest.mark.sphinx('html', testroot='root') def test_option_reference_with_value(app): app.build() content = (app.outdir / 'objects.html').read_text(encoding='utf-8') assert ( '-mapi' '' ) in content assert ( '' '-mapi[=xxx]' ) in content assert ( '-mapi with_space' ) in content