Skip to content

Commit

Permalink
test: update test cases (#29267)
Browse files Browse the repository at this point in the history
issue: #29227

Signed-off-by: nico <[email protected]>
  • Loading branch information
NicoYuan1986 authored Dec 18, 2023
1 parent 011a9ce commit 95ada1b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/python_client/testcases/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ def test_search_index_partitions(self, nb, nq, dim, auto_id, _async):
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.parametrize("partition_names",
[["(.*)"], ["search(.*)"]])
def test_search_index_partitions_fuzzy(self, nb, nq, dim, partition_names, auto_id, _async, enable_dynamic_field):
def test_search_index_partitions_fuzzy(self, nb, nq, dim, partition_names, auto_id, enable_dynamic_field):
"""
target: test search from partitions
method: search from partitions with fuzzy
Expand All @@ -2681,8 +2681,7 @@ def test_search_index_partitions_fuzzy(self, nb, nq, dim, partition_names, auto_
vectors = [[random.random() for _ in range(dim)] for _ in range(nq)]
# 2. create index
nlist = 128
default_index = {"index_type": "IVF_FLAT", "params": {
"nlist": nlist}, "metric_type": "COSINE"}
default_index = {"index_type": "IVF_FLAT", "params": {"nlist": nlist}, "metric_type": "COSINE"}
collection_w.create_index("float_vector", default_index)
collection_w.load()
# 3. search through partitions
Expand All @@ -2697,12 +2696,10 @@ def test_search_index_partitions_fuzzy(self, nb, nq, dim, partition_names, auto_
limit_check = par[1].num_entities
collection_w.search(vectors[:nq], default_search_field,
search_params, limit, default_search_exp,
partition_names, _async=_async,
check_task=CheckTasks.check_search_results,
check_items={"nq": nq,
"ids": insert_ids,
"limit": limit_check,
"_async": _async})
partition_names,
check_task=CheckTasks.err_res,
check_items={ct.err_code: 65535,
ct.err_msg: "partition name %s not found" % partition_names})

@pytest.mark.tags(CaseLabel.L2)
def test_search_index_partition_empty(self, nq, dim, auto_id, _async):
Expand Down

0 comments on commit 95ada1b

Please sign in to comment.