mirror of https://github.com/milvus-io/milvus.git
Add check for mismatched metric type in python sdk
Signed-off-by: ophunter233 <chengming.li@zilliz.com>pull/4973/head^2
parent
8e3ca57fde
commit
5384c7b70e
|
@ -2,13 +2,13 @@ grpcio==1.26.0
|
|||
grpcio-tools==1.26.0
|
||||
numpy==1.18.1
|
||||
pytest-cov==2.8.1
|
||||
pymilvus-distributed==0.0.41
|
||||
pymilvus-distributed==0.0.42
|
||||
sklearn==0.0
|
||||
pytest==6.2.2
|
||||
pytest-timeout==1.3.3
|
||||
pytest-repeat==0.8.0
|
||||
allure-pytest==2.7.0
|
||||
pytest-print==0.1.2
|
||||
pytest-print==0.2.1
|
||||
pytest-level==0.1.1
|
||||
pytest-xdist==2.2.1
|
||||
pytest-rerunfailures==9.1.1
|
||||
|
|
|
@ -647,6 +647,7 @@ class TestIndexBinary:
|
|||
res = connect.search(binary_collection, query, search_params=search_param)
|
||||
assert len(res) == nq
|
||||
|
||||
@pytest.mark.tags("0331")
|
||||
@pytest.mark.timeout(BUILD_TIMEOUT)
|
||||
def test_create_index_invalid_metric_type_binary(self, connect, binary_collection, get_l2_index):
|
||||
'''
|
||||
|
@ -657,13 +658,8 @@ class TestIndexBinary:
|
|||
# insert 6000 vectors
|
||||
ids = connect.insert(binary_collection, default_binary_entities)
|
||||
connect.flush([binary_collection])
|
||||
if get_l2_index["index_type"] == "BIN_FLAT":
|
||||
connect.create_index(binary_collection, binary_field_name, get_l2_index)
|
||||
binary_index = connect.describe_index(binary_collection, binary_field_name)
|
||||
assert binary_index == get_l2_index
|
||||
else:
|
||||
with pytest.raises(Exception) as e:
|
||||
res = connect.create_index(binary_collection, binary_field_name, get_l2_index)
|
||||
with pytest.raises(Exception) as e:
|
||||
res = connect.create_index(binary_collection, binary_field_name, get_l2_index)
|
||||
|
||||
"""
|
||||
******************************************************************
|
||||
|
|
Loading…
Reference in New Issue