diff --git a/tests/python_test/entity/test_insert.py b/tests/python_test/entity/test_insert.py index 0eca0581e761acf365dd0390cda84e2f6312e735..b8261da15970f6098ba46faf08c0dc74c03a03c4 100644 --- a/tests/python_test/entity/test_insert.py +++ b/tests/python_test/entity/test_insert.py @@ -746,7 +746,6 @@ class TestInsertAsync: stats = connect.get_collection_stats(collection) assert stats[row_count] == 0 - # #1339 @pytest.mark.tags("0331") def test_insert_async_invalid_params(self, connect): ''' @@ -770,6 +769,7 @@ class TestInsertAsync: ''' entities = [] future = connect.insert(collection, entities, _async=True) + future.done() with pytest.raises(Exception) as e: future.result() @@ -1128,12 +1128,11 @@ class TestInsertInvalidBinary(object): connect.insert(binary_collection, tmp_entity) @pytest.mark.level(2) - # #1352 - @pytest.mark.tags("fail") + @pytest.mark.tags("0331") def test_insert_with_invalid_field_entity_value(self, connect, binary_collection, get_field_vectors_value): tmp_entity = copy.deepcopy(default_binary_entity) src_vectors = tmp_entity[-1]["values"] - src_vectors[0][1] = get_field_vectors_value + src_vectors[0] = get_field_vectors_value with pytest.raises(Exception): connect.insert(binary_collection, tmp_entity) @@ -1160,7 +1159,6 @@ class TestInsertInvalidBinary(object): @pytest.mark.level(2) @pytest.mark.tags("0331") - # TODO 'bytes' object does not support item assignment def test_insert_with_invalid_field_entities_value(self, connect, binary_collection, get_field_vectors_value): tmp_entities = copy.deepcopy(default_binary_entities) src_vector = tmp_entities[-1]["values"] diff --git a/tests/python_test/test_index.py b/tests/python_test/test_index.py index 2051520ac984e0edde2a69a7ecfde40c96102eb6..f6cff1ba408001a53e603e39a456b69ce6a5b064 100644 --- a/tests/python_test/test_index.py +++ b/tests/python_test/test_index.py @@ -557,6 +557,13 @@ class TestIndexBase: connect.create_index(collection, field_name, get_simple_index) connect.drop_index(collection, field_name) + def test_create_PQ_without_nbits(self, connect, collection): + PQ_index = {"index_type": "IVF_PQ", "params": {"nlist": 128, "m": 16}, "metric_type": "L2"} + ids = connect.insert(collection, default_entities) + connect.create_index(collection, field_name, PQ_index) + index = connect.describe_index(collection, field_name) + assert index == PQ_index + class TestIndexBinary: @pytest.fixture(