Code Duplication    Length = 15-15 lines in 2 locations

tests/milvus_python_test/collection/test_collection_count.py 2 locations

@@ 276-290 (lines=15) @@
273
        status, res = connect.count_entities(ip_collection)
274
        assert res == nb
275
276
    def test_collection_rows_count_after_index_created(self, connect, ip_collection, get_simple_index):
277
        '''
278
        target: test count_entities, after index have been created
279
        method: add vectors in db, and create index, then calling count_entities with correct params
280
        expected: count_entities raise exception
281
        '''
282
        index_param = get_simple_index["index_param"]
283
        index_type = get_simple_index["index_type"]
284
        nb = 100
285
        vectors = gen_vectors(nb, dim)
286
        res = connect.insert(collection_name=ip_collection, records=vectors)
287
        connect.flush([ip_collection])
288
        connect.create_index(ip_collection, index_type, index_param)
289
        status, res = connect.count_entities(ip_collection)
290
        assert res == nb
291
292
    # @pytest.mark.level(2)
293
    # def test_count_without_connection(self, ip_collection, dis_connect):
@@ 132-146 (lines=15) @@
129
        status, res = connect.count_entities(collection)
130
        assert res == nb * 2
131
132
    def test_collection_rows_count_after_index_created(self, connect, collection, get_simple_index):
133
        '''
134
        target: test count_entities, after index have been created
135
        method: add vectors in db, and create index, then calling count_entities with correct params 
136
        expected: count_entities raise exception
137
        '''
138
        index_param = get_simple_index["index_param"]
139
        index_type = get_simple_index["index_type"]
140
        nb = 100
141
        vectors = gen_vectors(nb, dim)
142
        res = connect.insert(collection_name=collection, records=vectors)
143
        connect.flush([collection])
144
        connect.create_index(collection, index_type, index_param)
145
        status, res = connect.count_entities(collection)
146
        assert res == nb
147
148
    # @pytest.mark.level(2)
149
    # def test_count_without_connection(self, collection, dis_connect):