Skip to content

Commit c506c9d

Browse files
committed
tests(test_options): Add test for g parameter deprecation warning
why: Verify that show_option() emits DeprecationWarning when deprecated g parameter is used what: - Add test_show_option_g_parameter_emits_deprecation_warning test - Ensures backward compatibility warning is properly raised
1 parent 0723e93 commit c506c9d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_options.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,3 +1276,12 @@ def test_convert_values_preserves_sparse_keys() -> None:
12761276
assert result[0] is True
12771277
assert result[5] is False
12781278
assert result[99] == 100
1279+
1280+
1281+
def test_show_option_g_parameter_emits_deprecation_warning(
1282+
session: "Session",
1283+
) -> None:
1284+
"""Test show_option() emits DeprecationWarning when deprecated g parameter is used."""
1285+
server = session.server
1286+
with pytest.warns(DeprecationWarning, match=r"g argument is deprecated"):
1287+
server.show_option("buffer-limit", g=True)

0 commit comments

Comments
 (0)