Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
c01107e2
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c01107e2
编写于
10月 24, 2019
作者:
Z
zhenwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
re-define case level
Former-commit-id: 6c2ae8329c1ea9e22f0cba75d6603987a874b8c8
上级
581c662b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
5 deletion
+8
-5
tests/milvus_python_test/test_add_vectors.py
tests/milvus_python_test/test_add_vectors.py
+3
-1
tests/milvus_python_test/test_index.py
tests/milvus_python_test/test_index.py
+5
-4
未找到文件。
tests/milvus_python_test/test_add_vectors.py
浏览文件 @
c01107e2
...
...
@@ -407,6 +407,7 @@ class TestAddBase:
def
get_vector_id
(
self
,
request
):
yield
request
.
param
@
pytest
.
mark
.
level
(
2
)
def
test_add_vectors_ids_invalid
(
self
,
connect
,
table
,
get_vector_id
):
'''
target: test add vectors in table, use customize ids, which are not int64
...
...
@@ -974,6 +975,7 @@ class TestAddIP:
def
get_vector_id
(
self
,
request
):
yield
request
.
param
@
pytest
.
mark
.
level
(
2
)
def
test_add_vectors_ids_invalid
(
self
,
connect
,
ip_table
,
get_vector_id
):
'''
target: test add vectors in table, use customize ids, which are not int64
...
...
@@ -1223,7 +1225,7 @@ class TestAddTableVectorsInvalid(object):
with
pytest
.
raises
(
Exception
)
as
e
:
status
,
result
=
connect
.
add_vectors
(
table
,
tmp_single_vector
)
@
pytest
.
mark
.
level
(
1
)
@
pytest
.
mark
.
level
(
2
)
def
test_add_vectors_with_invalid_vectors
(
self
,
connect
,
table
,
gen_vector
):
tmp_vectors
=
copy
.
deepcopy
(
self
.
vectors
)
tmp_vectors
[
1
][
1
]
=
gen_vector
...
...
tests/milvus_python_test/test_index.py
浏览文件 @
c01107e2
...
...
@@ -528,7 +528,7 @@ class TestIndexIP:
The following cases are used to test `create_index` function
******************************************************************
"""
@
pytest
.
mark
.
level
(
2
)
@
pytest
.
mark
.
timeout
(
BUILD_TIMEOUT
)
def
test_create_index
(
self
,
connect
,
ip_table
,
get_index_params
):
'''
...
...
@@ -563,6 +563,7 @@ class TestIndexIP:
logging
.
getLogger
().
info
(
index_params
)
status
,
ids
=
connect
.
add_vectors
(
ip_table
,
vectors
)
status
=
connect
.
create_index
(
ip_table
,
index_params
)
assert
status
.
OK
()
logging
.
getLogger
().
info
(
connect
.
describe_index
(
ip_table
))
query_vecs
=
[
vectors
[
0
],
vectors
[
1
],
vectors
[
2
]]
top_k
=
5
...
...
@@ -933,19 +934,19 @@ class TestIndexTableInvalid(object):
def
get_table_name
(
self
,
request
):
yield
request
.
param
# @pytest.mark.level(1
)
@
pytest
.
mark
.
level
(
2
)
def
test_create_index_with_invalid_tablename
(
self
,
connect
,
get_table_name
):
table_name
=
get_table_name
status
=
connect
.
create_index
(
table_name
,
random
.
choice
(
gen_index_params
()))
assert
not
status
.
OK
()
# @pytest.mark.level(1
)
@
pytest
.
mark
.
level
(
2
)
def
test_describe_index_with_invalid_tablename
(
self
,
connect
,
get_table_name
):
table_name
=
get_table_name
status
,
result
=
connect
.
describe_index
(
table_name
)
assert
not
status
.
OK
()
# @pytest.mark.level(1
)
@
pytest
.
mark
.
level
(
2
)
def
test_drop_index_with_invalid_tablename
(
self
,
connect
,
get_table_name
):
table_name
=
get_table_name
status
=
connect
.
drop_index
(
table_name
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录