Apply patch [skip ci]

This commit is contained in:
open-swe[bot]
2025-09-10 00:09:27 +00:00
parent ec11e4b9e0
commit f9115be0b2

View File

@@ -174,13 +174,10 @@ def test_set_config_context_reuse_raises_error() -> None:
assert ctx1 is not None
# Second enter should raise RuntimeError
with pytest.raises(RuntimeError) as exc_info:
with ctx_manager: # noqa: SIM117
pass # Should not reach here
assert "Cannot re-enter an already-entered context manager" in str(
exc_info.value
)
with pytest.raises(
RuntimeError, match="Cannot re-enter an already-entered context manager"
):
ctx_manager.__enter__()
def test_set_config_context_exit_without_enter() -> None:
@@ -239,3 +236,4 @@ def test_set_config_context_nested_different_instances() -> None: