Skip to content

Commit edce609

Browse files
mr-milesclaude
andcommitted
Fix ruff lint/format errors in test_client_basic.py
Two multi-line test docstrings violated D205/D209 (missing blank line between summary and body, closing quotes not on own line). Reformatted to summary + body + closing quotes on their own line so prek/ruff is clean across all CI Python versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 20e7f31 commit edce609

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tests/unit/test_client_basic.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ async def test_login_with_preconfigured_fixture(mock_client_sha512):
126126

127127

128128
@pytest.mark.asyncio
129-
async def test_get_value_by_xpath_suppresses_unknown_path(
130-
mock_session_factory, login_success_response, xpath_unknown_path_error_response
131-
):
129+
async def test_get_value_by_xpath_suppresses_unknown_path(mock_session_factory, login_success_response, xpath_unknown_path_error_response):
132130
"""Test that suppress_action_errors=True returns None for UnknownPathException."""
133131
mock_session = mock_session_factory([login_success_response, xpath_unknown_path_error_response])
134132
client = SagemcomClient(
@@ -187,8 +185,10 @@ async def test_get_value_by_xpath_still_raises_auth_error_when_suppressed(
187185
async def test_get_values_by_xpaths_suppresses_unknown_path_per_action(
188186
mock_session_factory, login_success_response, xpaths_mixed_errors_response
189187
):
190-
"""Test that get_values_by_xpaths with suppress_action_errors=True returns None for
191-
unknown-path actions while preserving successful values from other actions."""
188+
"""Test per-action suppression of unknown-path errors.
189+
190+
Unknown-path actions return None while successful values from other actions are preserved.
191+
"""
192192
mock_session = mock_session_factory([login_success_response, xpaths_mixed_errors_response])
193193
client = SagemcomClient(
194194
host="192.168.1.1",
@@ -215,8 +215,10 @@ async def test_get_values_by_xpaths_suppresses_unknown_path_per_action(
215215
async def test_get_values_by_xpaths_still_raises_auth_error_when_suppressed(
216216
mock_session_factory, login_success_response, login_auth_error_response
217217
):
218-
"""Test that get_values_by_xpaths with suppress_action_errors=True still raises
219-
AuthenticationException instead of silently swallowing it."""
218+
"""Test that auth errors still raise even when suppression is enabled.
219+
220+
Authentication errors must propagate rather than be silently swallowed.
221+
"""
220222
mock_session = mock_session_factory([login_success_response, login_auth_error_response])
221223
client = SagemcomClient(
222224
host="192.168.1.1",

0 commit comments

Comments
 (0)