async def test_custom_async_engine_only(
    db: None, node_embeddings: List[TextNode]
) -> None:
    """Test that PGVectorStore works correctly with only a custom async engine."""
    from sqlalchemy.ext.asyncio import create_async_engine

    # Create custom async engine only
    async_engine = create_async_engine(
        f"postgresql+asyncpg://{PARAMS['user']}:{PARAMS['password']}@{PARAMS['host']}:{PARAMS['port']}/{TEST_DB}",
    )

    # Create PGVectorStore with custom async engine only
    with pytest.raises(ValueError):
        _ = PGVectorStore(
            embed_dim=TEST_EMBED_DIM,
            async_engine=async_engine,
        )
Test that PGVectorStore works correctly with only a custom async engine.
llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/tests/test_postgres.py