From 35dd05e48586a7a175b5a53e06fde62597d32c68 Mon Sep 17 00:00:00 2001 From: zhenwu Date: Sat, 19 Oct 2019 19:34:46 +0800 Subject: [PATCH] update java-tests and classified python-tests by opensource and internal case #50 Former-commit-id: d159db8073d7f992828524faea77a472d896c8b6 --- tests/milvus_python_test/test_delete_vectors.py | 4 ++-- tests/milvus_python_test/test_index.py | 4 ++-- tests/milvus_python_test/test_search_vectors.py | 2 +- tests/milvus_python_test/test_table.py | 7 +++++-- tests/milvus_python_test/test_table_count.py | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/milvus_python_test/test_delete_vectors.py b/tests/milvus_python_test/test_delete_vectors.py index 70cf086a..4e1f7d10 100644 --- a/tests/milvus_python_test/test_delete_vectors.py +++ b/tests/milvus_python_test/test_delete_vectors.py @@ -109,7 +109,7 @@ class TestDeleteVectorsBase: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param @@ -295,7 +295,7 @@ class TestDeleteVectorsIP: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param diff --git a/tests/milvus_python_test/test_index.py b/tests/milvus_python_test/test_index.py index 255e46b2..435a5478 100644 --- a/tests/milvus_python_test/test_index.py +++ b/tests/milvus_python_test/test_index.py @@ -27,7 +27,7 @@ class TestIndexBase: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param @@ -505,7 +505,7 @@ class TestIndexIP: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param diff --git a/tests/milvus_python_test/test_search_vectors.py b/tests/milvus_python_test/test_search_vectors.py index b9257f9c..e52e0d2d 100644 --- a/tests/milvus_python_test/test_search_vectors.py +++ b/tests/milvus_python_test/test_search_vectors.py @@ -44,7 +44,7 @@ class TestSearchBase: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param diff --git a/tests/milvus_python_test/test_table.py b/tests/milvus_python_test/test_table.py index c92afb02..7088f923 100644 --- a/tests/milvus_python_test/test_table.py +++ b/tests/milvus_python_test/test_table.py @@ -590,8 +590,11 @@ class TestTable: scope="function", params=gen_index_params() ) - def get_index_params(self, request): - yield request.param + def get_index_params(self, request, args): + if "internal" not in args: + if request.param["index_type"] == IndexType.IVF_SQ8H: + pytest.skip("sq8h not support in open source") + return request.param @pytest.mark.level(1) def test_preload_table(self, connect, table, get_index_params): diff --git a/tests/milvus_python_test/test_table_count.py b/tests/milvus_python_test/test_table_count.py index 6d7b56df..820fb9d5 100644 --- a/tests/milvus_python_test/test_table_count.py +++ b/tests/milvus_python_test/test_table_count.py @@ -39,7 +39,7 @@ class TestTableCount: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param @@ -183,7 +183,7 @@ class TestTableCountIP: params=gen_index_params() ) def get_index_params(self, request, args): - if "internal" in args: + if "internal" not in args: if request.param["index_type"] == IndexType.IVF_SQ8H: pytest.skip("sq8h not support in open source") return request.param -- GitLab