Code Duplication    Length = 17-17 lines in 4 locations

tests/milvus_python_test/test_index.py 4 locations

@@ 1639-1655 (lines=17) @@
1636
        assert result._collection_name == ham_collection
1637
        assert result._index_type == index_type
1638
1639
    def test_get_index_info_partition_superstructrue(self, connect, superstructure_collection, get_superstructure_index):
1640
        '''
1641
        target: test describe index interface
1642
        method: create collection, create partition and add vectors in it, create index, call describe index
1643
        expected: return code 0, and index instructure
1644
        '''
1645
        index_param = get_superstructure_index["index_param"]
1646
        index_type = get_superstructure_index["index_type"]
1647
        logging.getLogger().info(get_superstructure_index)
1648
        status = connect.create_partition(superstructure_collection, tag)
1649
        status, ids = connect.insert(superstructure_collection, vectors, partition_tag=tag)
1650
        status = connect.create_index(superstructure_collection, index_type, index_param)
1651
        status, result = connect.get_index_info(superstructure_collection)
1652
        logging.getLogger().info(result)
1653
        assert result._params == index_param
1654
        assert result._collection_name == superstructure_collection
1655
        assert result._index_type == index_type
1656
1657
    """
1658
    ******************************************************************
@@ 1621-1637 (lines=17) @@
1618
        assert result._index_type == index_type
1619
        assert result._params == index_param
1620
1621
    def test_get_index_info_partition(self, connect, ham_collection, get_hamming_index):
1622
        '''
1623
        target: test describe index interface
1624
        method: create collection, create partition and add vectors in it, create index, call describe index
1625
        expected: return code 0, and index instructure
1626
        '''
1627
        index_param = get_hamming_index["index_param"]
1628
        index_type = get_hamming_index["index_type"]
1629
        logging.getLogger().info(get_hamming_index)
1630
        status = connect.create_partition(ham_collection, tag)
1631
        status, ids = connect.insert(ham_collection, vectors, partition_tag=tag)
1632
        status = connect.create_index(ham_collection, index_type, index_param)
1633
        status, result = connect.get_index_info(ham_collection)
1634
        logging.getLogger().info(result)
1635
        assert result._params == index_param
1636
        assert result._collection_name == ham_collection
1637
        assert result._index_type == index_type
1638
1639
    def test_get_index_info_partition_superstructrue(self, connect, superstructure_collection, get_superstructure_index):
1640
        '''
@@ 1360-1376 (lines=17) @@
1357
        assert result._index_type == index_type
1358
        assert result._params == index_param
1359
1360
    def test_get_index_info_partition(self, connect, jac_collection, get_jaccard_index):
1361
        '''
1362
        target: test describe index interface
1363
        method: create collection, create partition and add vectors in it, create index, call describe index
1364
        expected: return code 0, and index instructure
1365
        '''
1366
        index_param = get_jaccard_index["index_param"]
1367
        index_type = get_jaccard_index["index_type"]
1368
        logging.getLogger().info(get_jaccard_index)
1369
        status = connect.create_partition(jac_collection, tag)
1370
        status, ids = connect.insert(jac_collection, vectors, partition_tag=tag)
1371
        status = connect.create_index(jac_collection, index_type, index_param)
1372
        status, result = connect.get_index_info(jac_collection)
1373
        logging.getLogger().info(result)
1374
        assert result._params == index_param
1375
        assert result._collection_name == jac_collection
1376
        assert result._index_type == index_type
1377
1378
    """
1379
    ******************************************************************
@@ 949-965 (lines=17) @@
946
            assert result._index_type == index_type
947
            assert result._params == index_param
948
949
    def test_get_index_info_partition(self, connect, ip_collection, get_simple_index):
950
        '''
951
        target: test describe index interface
952
        method: create collection, create partition and add vectors in it, create index, call describe index
953
        expected: return code 0, and index instructure
954
        '''
955
        index_param = get_simple_index["index_param"]
956
        index_type = get_simple_index["index_type"]
957
        logging.getLogger().info(get_simple_index)
958
        status = connect.create_partition(ip_collection, tag)
959
        status, ids = connect.insert(ip_collection, vectors, partition_tag=tag)
960
        status = connect.create_index(ip_collection, index_type, index_param)
961
        status, result = connect.get_index_info(ip_collection)
962
        logging.getLogger().info(result)
963
        assert result._params == index_param
964
        assert result._collection_name == ip_collection
965
        assert result._index_type == index_type
966
967
    def test_get_index_info_partition_A(self, connect, ip_collection, get_simple_index):
968
        '''