fix(python): validate numpy vector queries safely (#502)
This commit is contained in:
@@ -428,6 +428,11 @@ class TestQuery:
|
||||
with pytest.raises(ValueError):
|
||||
vq._validate()
|
||||
|
||||
def test_validate_fails_on_both_id_and_numpy_vector(self):
|
||||
vq = Query(field_name="test", id="doc123", vector=np.array([0.1]))
|
||||
with pytest.raises(ValueError, match="Cannot provide both id and vector"):
|
||||
vq._validate()
|
||||
|
||||
|
||||
class TestVectorQueryDeprecated:
|
||||
def test_deprecation_warning(self):
|
||||
|
||||
Reference in New Issue
Block a user