@@ 1443-1453 (lines=11) @@ | ||
1440 | pytest.skip("Skip PQ Temporary") |
|
1441 | return request.param |
|
1442 | ||
1443 | @pytest.fixture( |
|
1444 | scope="function", |
|
1445 | params=gen_simple_index() |
|
1446 | ) |
|
1447 | def get_simple_index(self, request, connect): |
|
1448 | if str(connect._cmd("mode")[1]) == "CPU": |
|
1449 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
1450 | pytest.skip("sq8h not support in CPU mode") |
|
1451 | if request.param["index_type"] == IndexType.IVF_PQ or request.param["index_type"] == IndexType.HNSW: |
|
1452 | pytest.skip("Skip PQ Temporary") |
|
1453 | return request.param |
|
1454 | ||
1455 | @pytest.fixture( |
|
1456 | scope="function", |
@@ 809-819 (lines=11) @@ | ||
806 | """ |
|
807 | generate valid create_index params |
|
808 | """ |
|
809 | @pytest.fixture( |
|
810 | scope="function", |
|
811 | params=gen_simple_index() |
|
812 | ) |
|
813 | def get_simple_index(self, request, connect): |
|
814 | if str(connect._cmd("mode")[1]) == "CPU": |
|
815 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
816 | pytest.skip("sq8h not support in cpu mode") |
|
817 | if request.param["index_type"] == IndexType.IVF_PQ: |
|
818 | pytest.skip("Skip PQ Temporary") |
|
819 | return request.param |
|
820 | ||
821 | @pytest.mark.level(1) |
|
822 | def test_load_collection(self, connect, collection, get_simple_index): |
@@ 250-260 (lines=11) @@ | ||
247 | generate valid create_index params |
|
248 | """ |
|
249 | ||
250 | @pytest.fixture( |
|
251 | scope="function", |
|
252 | params=gen_simple_index() |
|
253 | ) |
|
254 | def get_simple_index(self, request, connect): |
|
255 | if str(connect._cmd("mode")[1]) == "CPU": |
|
256 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
257 | pytest.skip("sq8h not support in CPU mode") |
|
258 | if request.param["index_type"] == IndexType.IVF_PQ: |
|
259 | pytest.skip("Skip PQ Temporary") |
|
260 | return request.param |
|
261 | ||
262 | def test_collection_rows_count(self, connect, ip_collection, insert_nb): |
|
263 | ''' |
|
@@ 35-45 (lines=11) @@ | ||
32 | """ |
|
33 | generate valid create_index params |
|
34 | """ |
|
35 | @pytest.fixture( |
|
36 | scope="function", |
|
37 | params=gen_simple_index() |
|
38 | ) |
|
39 | def get_simple_index(self, request, connect): |
|
40 | if str(connect._cmd("mode")[1]) == "CPU": |
|
41 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
42 | pytest.skip("sq8h not support in cpu mode") |
|
43 | if request.param["index_type"] == IndexType.IVF_PQ: |
|
44 | pytest.skip("Skip PQ Temporary") |
|
45 | return request.param |
|
46 | ||
47 | def test_collection_rows_count(self, connect, collection, insert_nb): |
|
48 | ''' |
@@ 27-37 (lines=11) @@ | ||
24 | The following cases are used to test `insert` function |
|
25 | ****************************************************************** |
|
26 | """ |
|
27 | @pytest.fixture( |
|
28 | scope="function", |
|
29 | params=gen_simple_index() |
|
30 | ) |
|
31 | def get_simple_index(self, request, connect): |
|
32 | if str(connect._cmd("mode")[1]) == "CPU": |
|
33 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
34 | pytest.skip("sq8h not support in cpu mode") |
|
35 | if request.param["index_type"] == IndexType.IVF_PQ: |
|
36 | pytest.skip("Skip PQ Temporary") |
|
37 | return request.param |
|
38 | ||
39 | def test_add_vector_create_collection(self, connect, collection): |
|
40 | ''' |
|
@@ 801-811 (lines=11) @@ | ||
798 | The following cases are used to test `insert / index / search / delete` mixed function |
|
799 | ****************************************************************** |
|
800 | """ |
|
801 | @pytest.fixture( |
|
802 | scope="function", |
|
803 | params=gen_simple_index() |
|
804 | ) |
|
805 | def get_simple_index(self, request, connect): |
|
806 | if str(connect._cmd("mode")[1]) == "CPU": |
|
807 | if request.param["index_type"] == IndexType.IVF_SQ8H: |
|
808 | pytest.skip("sq8h not support in cpu mode") |
|
809 | if request.param["index_type"] == IndexType.IVF_PQ: |
|
810 | pytest.skip("Skip PQ Temporary") |
|
811 | return request.param |
|
812 | ||
813 | def test_add_vector_create_collection(self, connect, ip_collection): |
|
814 | ''' |