1""" 2 test_ext_duration 3 ~~~~~~~~~~~~~~~~~ 4 5 Test sphinx.ext.duration extension. 6 7 :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. 8 :license: BSD, see LICENSE for details. 9""" 10 11import re 12 13import pytest 14 15 16@pytest.mark.sphinx('dummy', testroot='basic', 17 confoverrides={'extensions': ['sphinx.ext.duration']}) 18def test_githubpages(app, status, warning): 19 app.build() 20 21 assert 'slowest reading durations' in status.getvalue() 22 assert re.search('\\d+\\.\\d{3} index\n', status.getvalue()) 23