1""" 2 test_ext_ifconfig 3 ~~~~~~~~~~~~~~~~~ 4 5 Test sphinx.ext.ifconfig extension. 6 7 :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. 8 :license: BSD, see LICENSE for details. 9""" 10 11import pytest 12 13 14@pytest.mark.sphinx('text', testroot='ext-ifconfig') 15def test_ifconfig(app, status, warning): 16 app.builder.build_all() 17 result = (app.outdir / 'index.txt').read_text() 18 assert 'spam' in result 19 assert 'ham' not in result 20