diff --git a/tests/test_extensions/test_ext_intersphinx.py b/tests/test_extensions/test_ext_intersphinx.py index b107db36a70..e4b2c0d2ffe 100644 --- a/tests/test_extensions/test_ext_intersphinx.py +++ b/tests/test_extensions/test_ext_intersphinx.py @@ -314,13 +314,13 @@ def test_missing_reference_stddomain(tmp_path, app): @pytest.mark.parametrize( - ('term', 'is_ambiguous'), + ('term', 'expected_ambiguity'), [ ('A TERM', False), ('B TERM', True), ], ) -def test_ambiguous_reference_handling(term, is_ambiguous, tmp_path, app, warning): +def test_ambiguous_reference_handling(term, expected_ambiguity, tmp_path, app, warning): inv_file = tmp_path / 'inventory' inv_file.write_bytes(INVENTORY_V2_AMBIGUOUS_TERMS) set_config( @@ -338,10 +338,8 @@ def test_ambiguous_reference_handling(term, is_ambiguous, tmp_path, app, warning node, contnode = fake_node('std', 'term', term, term) missing_reference(app, app.env, node, contnode) - reported_ambiguous = ( - f'multiple matches found for std:term:{term}' in warning.getvalue() - ) - assert is_ambiguous is reported_ambiguous + ambiguity = f'multiple matches found for std:term:{term}' in warning.getvalue() + assert ambiguity is expected_ambiguity @pytest.mark.sphinx('html', testroot='ext-intersphinx-cppdomain')