Merge branch '5.1.x' into 5.x

This commit is contained in:
Jean-François B
2022-08-01 21:05:47 +02:00
5 changed files with 20 additions and 11 deletions

View File

@@ -1519,7 +1519,7 @@ def test_latex_labels(app, status, warning):
def test_latex_figure_in_admonition(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'python.tex').read_text(encoding='utf8')
assert(r'\begin{figure}[H]' in result)
assert r'\begin{figure}[H]' in result
def test_default_latex_documents():

View File

@@ -95,8 +95,10 @@ class SetupTest(TestCase):
for name in Config._config_values:
has_config = False
for method_name, args, _kwargs in app.method_calls:
if(method_name == 'add_config_value' and
args[0] == name):
if (
method_name == 'add_config_value' and
args[0] == name
):
has_config = True
if not has_config:
self.fail('Config value was not added to app %s' % name)
@@ -105,11 +107,15 @@ class SetupTest(TestCase):
has_skip_member = False
for method_name, args, _kwargs in app.method_calls:
if method_name == 'connect':
if(args[0] == 'autodoc-process-docstring' and
args[1] == _process_docstring):
if (
args[0] == 'autodoc-process-docstring' and
args[1] == _process_docstring
):
has_process_docstring = True
elif(args[0] == 'autodoc-skip-member' and
args[1] == _skip_member):
elif (
args[0] == 'autodoc-skip-member' and
args[1] == _skip_member
):
has_skip_member = True
if not has_process_docstring:
self.fail('autodoc-process-docstring never connected')