def test_ensure_httpx_close_restore_client():
    """Test that the original client is restored after context exit."""
    original_client = httpx.Client
    with ensure_httpx_close():
        assert httpx.Client != original_client

    # Original __init__ should be restored
    assert httpx.Client == original_client
Test that the original client is restored after context exit.
tests/unit/test_ensure_httpx_close.py