Code Duplication    Length = 14-15 lines in 2 locations

tests/milvus_python_test/test_index.py 2 locations

@@ 103-117 (lines=15) @@
100
        status = connect.create_index(collection, index_type, index_param)
101
        assert status.OK()
102
103
    @pytest.mark.timeout(BUILD_TIMEOUT)
104
    def test_create_index_partition_flush(self, connect, collection, get_simple_index):
105
        '''
106
        target: test create index interface
107
        method: create collection, create partition, and add vectors in it, create index
108
        expected: return code equals to 0, and search success
109
        '''
110
        index_param = get_simple_index["index_param"]
111
        index_type = get_simple_index["index_type"]
112
        logging.getLogger().info(get_simple_index)
113
        status = connect.create_partition(collection, tag)
114
        status, ids = connect.insert(collection, vectors, partition_tag=tag)
115
        connect.flush()
116
        status = connect.create_index(collection, index_type, index_param)
117
        assert status.OK()
118
119
    # @pytest.mark.level(2)
120
    # def test_create_index_without_connect(self, dis_connect, collection):
@@ 88-101 (lines=14) @@
85
        status = connect.create_index(collection, index_type, index_param)
86
        assert status.OK()
87
88
    @pytest.mark.timeout(BUILD_TIMEOUT)
89
    def test_create_index_partition(self, connect, collection, get_simple_index):
90
        '''
91
        target: test create index interface
92
        method: create collection, create partition, and add vectors in it, create index
93
        expected: return code equals to 0, and search success
94
        '''
95
        index_param = get_simple_index["index_param"]
96
        index_type = get_simple_index["index_type"]
97
        logging.getLogger().info(get_simple_index)
98
        status = connect.create_partition(collection, tag)
99
        status, ids = connect.insert(collection, vectors, partition_tag=tag)
100
        status = connect.create_index(collection, index_type, index_param)
101
        assert status.OK()
102
103
    @pytest.mark.timeout(BUILD_TIMEOUT)
104
    def test_create_index_partition_flush(self, connect, collection, get_simple_index):