Code Duplication    Length = 12-12 lines in 2 locations

tests/milvus_python_test/entity/test_delete.py 1 location

@@ 37-48 (lines=12) @@
34
      The following cases are used to test `delete_entity_by_id` function
35
    ******************************************************************
36
    """
37
    @pytest.fixture(
38
        scope="function",
39
        params=gen_simple_index()
40
    )
41
    def get_simple_index(self, request, connect):
42
        if str(connect._cmd("mode")) == "GPU":
43
            if not request.param["index_type"] not in ivf():
44
                pytest.skip("Only support index_type: idmap/ivf")
45
        if str(connect._cmd("mode")) == "CPU":
46
            if request.param["index_type"] in index_cpu_not_support():
47
                pytest.skip("CPU not support index_type: ivf_sq8h")
48
        return request.param
49
50
    @pytest.fixture(
51
        scope="function",

tests/milvus_python_test/test_compact.py 1 location

@@ 214-225 (lines=12) @@
211
        logging.getLogger().info(info_after["partitions"])
212
        assert info["partitions"][1]["segments"][0]["data_size"] > info_after["partitions"][1]["segments"][0]["data_size"]
213
214
    @pytest.fixture(
215
        scope="function",
216
        params=gen_simple_index()
217
    )
218
    def get_simple_index(self, request, connect):
219
        if str(connect._cmd("mode")) == "GPU":
220
            if not request.param["index_type"] not in ivf():
221
                pytest.skip("Only support index_type: idmap/ivf")
222
        if str(connect._cmd("mode")) == "CPU":
223
            if request.param["index_type"] in index_cpu_not_support():
224
                pytest.skip("CPU not support index_type: ivf_sq8h")
225
        return request.param
226
227
    @pytest.mark.skip(reason="create_index not support yet")
228
    def test_compact_after_index_created(self, connect, collection, get_simple_index):