Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
16697542
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
16697542
编写于
3月 05, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3161]<test>Inc coverage of calculation
上级
d97e7274
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
4 deletion
+26
-4
tests/pytest/functions/function_operations.py
tests/pytest/functions/function_operations.py
+26
-4
未找到文件。
tests/pytest/functions/function_operations.py
浏览文件 @
16697542
...
@@ -69,15 +69,37 @@ class TDTestCase:
...
@@ -69,15 +69,37 @@ class TDTestCase:
tdSql
.
checkData
(
10
,
0
,
None
)
tdSql
.
checkData
(
10
,
0
,
None
)
# test for tarithoperator.c coverage
# test for tarithoperator.c coverage
col_list
=
[
'col1'
,
'col2'
,
'col3'
,
'col4'
,
'col5'
,
'col6'
,
'col11'
,
'col12'
,
'col13'
,
'col14'
,
'1'
]
tdSql
.
execute
(
"insert into test1 values(1537146000010,1,NULL,9,8,1.2,1.3,0,1,1,5,4,3,2)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000011,2,1,NULL,9,1.2,1.3,1,2,2,6,5,4,3)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000012,3,2,1,NULL,1.2,1.3,0,3,3,7,6,5,4)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000013,4,3,2,1,1.2,1.3,1,4,4,8,7,6,5)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000014,5,4,3,2,1.2,1.3,0,5,5,9,8,7,6)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000015,6,5,4,3,1.2,1.3,1,6,6,NULL,9,8,7)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000016,7,6,5,4,1.2,1.3,0,7,7,1,NULL,9,8)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000017,8,7,6,5,1.2,1.3,1,8,8,2,1,NULL,9)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000018,9,8,7,6,1.2,1.3,0,9,9,3,2,1,NULL)"
)
tdSql
.
execute
(
"insert into test1 values(1537146000019,NULL,9,8,7,1.2,1.3,1,10,10,4,3,2,1)"
)
self
.
ts
=
self
.
ts
+
self
.
rowNum
+
10
tdSql
.
execute
(
"insert into test1 values(%d, 1, 1, 1, 1, 1.1, 1.1, 1, NULL, '涛思数据3', 1, 1, 1, 1)"
%
(
self
.
ts
+
self
.
rowNum
+
1
))
tdSql
.
execute
(
"insert into test1 values(%d, 1, 1, 1, 1, 1.1, 1.1, 1, 'taosdata', NULL, 1, 1, 1, 1)"
%
(
self
.
ts
+
self
.
rowNum
+
2
))
tdSql
.
execute
(
"insert into test1 values(%d, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)"
%
(
self
.
ts
+
self
.
rowNum
+
3
))
tdSql
.
execute
(
"insert into test1 values(%d, 1, 1, 1, 1, NULL, 1.1, 1, NULL, '涛思数据3', 1, 1, 1, 1)"
%
(
self
.
ts
+
self
.
rowNum
+
4
))
tdSql
.
execute
(
"insert into test1 values(%d, 1, 1, 1, 1, 1.1, NULL, 1, 'taosdata', NULL, 1, 1, 1, 1)"
%
(
self
.
ts
+
self
.
rowNum
+
5
))
self
.
rowNum
=
self
.
rowNum
+
5
col_list
=
[
'col1'
,
'col2'
,
'col3'
,
'col4'
,
'col5'
,
'col6'
,
'col7'
,
'col8'
,
'col9'
,
'col11'
,
'col12'
,
'col13'
,
'col14'
,
'1'
,
'1.1'
,
'NULL'
]
op_list
=
[
'+'
,
'-'
,
'*'
,
'/'
,
'%'
]
op_list
=
[
'+'
,
'-'
,
'*'
,
'/'
,
'%'
]
err_list
=
[
'col7'
,
'col8'
,
'col9'
,
'NULL'
]
for
i
in
col_list
:
for
i
in
col_list
:
for
j
in
col_list
:
for
j
in
col_list
:
for
k
in
op_list
:
for
k
in
op_list
:
sql
=
" select %s %s %s from test1 "
%
(
i
,
k
,
j
)
sql
=
" select %s %s %s from test1 "
%
(
i
,
k
,
j
)
print
(
sql
)
if
i
in
err_list
or
j
in
err_list
:
tdSql
.
query
(
sql
)
tdSql
.
error
(
sql
)
else
:
tdSql
.
query
(
sql
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录