Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
e3ad6509
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e3ad6509
编写于
2月 26, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
3b4f730f
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
88 addition
and
145 deletion
+88
-145
tests/pytest/functions/function_count_restart.py
tests/pytest/functions/function_count_restart.py
+4
-4
tests/pytest/functions/function_diff_restart.py
tests/pytest/functions/function_diff_restart.py
+8
-8
tests/pytest/functions/function_leastsquares.py
tests/pytest/functions/function_leastsquares.py
+12
-4
tests/pytest/functions/function_leastsquares_restart.py
tests/pytest/functions/function_leastsquares_restart.py
+12
-0
tests/pytest/functions/function_operations_restart.py
tests/pytest/functions/function_operations_restart.py
+1
-1
tests/pytest/functions/function_spread.py
tests/pytest/functions/function_spread.py
+32
-8
tests/pytest/functions/function_spread_restart.py
tests/pytest/functions/function_spread_restart.py
+18
-9
tests/pytest/insert/unsigenedSmallint.py
tests/pytest/insert/unsigenedSmallint.py
+0
-108
tests/pytest/insert/unsignedBigint.py
tests/pytest/insert/unsignedBigint.py
+0
-0
tests/pytest/insert/unsignedInt.py
tests/pytest/insert/unsignedInt.py
+0
-0
tests/pytest/insert/unsignedTinyint.py
tests/pytest/insert/unsignedTinyint.py
+0
-0
tests/pytest/tag_lite/delete.py
tests/pytest/tag_lite/delete.py
+1
-3
未找到文件。
tests/pytest/functions/function_count_restart.py
浏览文件 @
e3ad6509
...
...
@@ -63,13 +63,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
11
)
tdSql
.
query
(
"select count(col11) from test"
)
tdSql
.
checkData
(
0
,
0
,
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
1
)
tdSql
.
query
(
"select count(col12) from test"
)
tdSql
.
checkData
(
0
,
0
,
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
1
)
tdSql
.
query
(
"select count(col13) from test"
)
tdSql
.
checkData
(
0
,
0
,
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
1
)
tdSql
.
query
(
"select count(col14) from test"
)
tdSql
.
checkData
(
0
,
0
,
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
1
)
#tdSql.execute("alter table test add column col10 int")
#tdSql.query("select count(col10) from test")
...
...
tests/pytest/functions/function_diff_restart.py
浏览文件 @
e3ad6509
...
...
@@ -71,14 +71,14 @@ class TDTestCase:
tdSql
.
error
(
"select diff(col8) from test"
)
tdSql
.
error
(
"select diff(col8) from test1"
)
tdSql
.
error
(
"select diff(col9) from test"
)
tdSql
.
err
(
"select diff(col11) from test1"
)
tdSql
.
err
(
"select diff(col12) from test1"
)
tdSql
.
err
(
"select diff(col13) from test1"
)
tdSql
.
err
(
"select diff(col14) from test1"
)
tdSql
.
err
(
"select diff(col11) from test"
)
tdSql
.
err
(
"select diff(col12) from test"
)
tdSql
.
err
(
"select diff(col13) from test"
)
tdSql
.
err
(
"select diff(col14) from test"
)
tdSql
.
err
or
(
"select diff(col11) from test1"
)
tdSql
.
err
or
(
"select diff(col12) from test1"
)
tdSql
.
err
or
(
"select diff(col13) from test1"
)
tdSql
.
err
or
(
"select diff(col14) from test1"
)
tdSql
.
err
or
(
"select diff(col11) from test"
)
tdSql
.
err
or
(
"select diff(col12) from test"
)
tdSql
.
err
or
(
"select diff(col13) from test"
)
tdSql
.
err
or
(
"select diff(col14) from test"
)
tdSql
.
query
(
"select diff(col1) from test1"
)
tdSql
.
checkRows
(
10
)
...
...
tests/pytest/functions/function_leastsquares.py
浏览文件 @
e3ad6509
...
...
@@ -52,10 +52,6 @@ class TDTestCase:
tdSql
.
error
(
"select leastsquares(col12, 1, 1) from test"
)
tdSql
.
error
(
"select leastsquares(col13, 1, 1) from test"
)
tdSql
.
error
(
"select leastsquares(col14, 1, 1) from test"
)
tdSql
.
error
(
"select leastsquares(col11, 1, 1) from test1"
)
tdSql
.
error
(
"select leastsquares(col12, 1, 1) from test1"
)
tdSql
.
error
(
"select leastsquares(col13, 1, 1) from test1"
)
tdSql
.
error
(
"select leastsquares(col14, 1, 1) from test1"
)
tdSql
.
query
(
"select leastsquares(col1, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
...
...
@@ -69,6 +65,18 @@ class TDTestCase:
tdSql
.
query
(
"select leastsquares(col4, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col11, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col12, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col13, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col14, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col5, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:-0.900000}'
)
...
...
tests/pytest/functions/function_leastsquares_restart.py
浏览文件 @
e3ad6509
...
...
@@ -54,6 +54,18 @@ class TDTestCase:
tdSql
.
query
(
"select leastsquares(col4, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col11, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col12, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col13, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col14, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:0.000000}'
)
tdSql
.
query
(
"select leastsquares(col5, 1, 1) from test1"
)
tdSql
.
checkData
(
0
,
0
,
'{slop:1.000000, intercept:-0.900000}'
)
...
...
tests/pytest/functions/function_operations_restart.py
浏览文件 @
e3ad6509
...
...
@@ -45,7 +45,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
2.0
)
tdSql
.
query
(
"select col1 + col2 * col3 + col3 / col4 + col5 + col6 + col11 + col12 + col13 + col14 from test1"
)
tdSql
.
checkRows
(
1
0
)
tdSql
.
checkRows
(
1
1
)
tdSql
.
checkData
(
0
,
0
,
7.2
)
#tdSql.execute("insert into test1(ts, col1) values(%d, 11)" % (self.ts + 11))
...
...
tests/pytest/functions/function_spread.py
浏览文件 @
e3ad6509
...
...
@@ -55,6 +55,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
"select spread(col11) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
"select spread(col12) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
"select spread(col13) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
"select spread(col14) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
"select spread(col5) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
...
@@ -73,14 +89,6 @@ class TDTestCase:
tdSql
.
error
(
"select spread(col8) from test1"
)
tdSql
.
error
(
"select spread(col9) from test"
)
tdSql
.
error
(
"select spread(col9) from test1"
)
tdSql
.
error
(
"select spread(col11) from test"
)
tdSql
.
error
(
"select spread(col11) from test1"
)
tdSql
.
error
(
"select spread(col12) from test"
)
tdSql
.
error
(
"select spread(col12) from test1"
)
tdSql
.
error
(
"select spread(col13) from test"
)
tdSql
.
error
(
"select spread(col13) from test1"
)
tdSql
.
error
(
"select spread(col14) from test"
)
tdSql
.
error
(
"select spread(col14) from test1"
)
tdSql
.
query
(
"select spread(col1) from test1"
)
tdSql
.
checkRows
(
1
)
...
...
@@ -98,6 +106,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col11) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col12) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col13) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col14) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col5) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
9.1
)
...
...
tests/pytest/functions/function_spread_restart.py
浏览文件 @
e3ad6509
...
...
@@ -36,16 +36,8 @@ class TDTestCase:
tdSql
.
error
(
"select spread(col8) from test1"
)
tdSql
.
error
(
"select spread(col9) from test"
)
tdSql
.
error
(
"select spread(col9) from test1"
)
tdSql
.
error
(
"select spread(col11) from test"
)
tdSql
.
error
(
"select spread(col11) from test1"
)
tdSql
.
error
(
"select spread(col12) from test"
)
tdSql
.
error
(
"select spread(col12) from test1"
)
tdSql
.
error
(
"select spread(col13) from test"
)
tdSql
.
error
(
"select spread(col13) from test1"
)
tdSql
.
error
(
"select spread(col14) from test"
)
tdSql
.
error
(
"select spread(col14) from test1"
)
tdSql
.
query
(
"select spread(col1) from test1"
)
tdSql
.
query
(
"select spread(col1) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
...
...
@@ -61,6 +53,23 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col11) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col12) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col13) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col14) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
query
(
"select spread(col5) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
9.1
)
...
...
tests/pytest/insert/unsigenedSmallint.py
已删除
100644 → 0
浏览文件 @
3b4f730f
# -*- coding: utf-8 -*-
import
sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
'=============== step1'
)
tdLog
.
info
(
'create table tb (ts timestamp, speed smallint unsigned)'
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed smallint unsigned)'
)
tdLog
.
info
(
"insert into tb values (now, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now, NULL)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step2'
)
tdLog
.
info
(
"insert into tb values (now+1m, -1) -x step2"
)
tdSql
.
error
(
"insert into tb values (now+1m, -1) "
)
tdLog
.
info
(
"insert into tb values (now+1m, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now+1m, NULL)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(2)'
)
tdSql
.
checkRows
(
2
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step3'
)
tdLog
.
info
(
"insert into tb values (now+2m, 4294967294)"
)
tdSql
.
execute
(
"insert into tb values (now+2m, 4294967294)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(3)'
)
tdSql
.
checkRows
(
3
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 254)'
)
tdSql
.
checkData
(
0
,
1
,
254
)
tdLog
.
info
(
'=============== step4'
)
tdLog
.
info
(
"insert into tb values (now+3m, 4294967295) -x step4"
)
tdSql
.
error
(
"insert into tb values (now+3m, 4294967295)"
)
tdLog
.
info
(
"insert into tb values (now+3m, NULL)"
)
tdSql
.
execute
(
"insert into tb values (now+3m, NULL)"
)
tdLog
.
info
(
'select * from tb'
)
tdSql
.
query
(
'select * from tb'
)
tdLog
.
info
(
'tdSql.checkRow(4)'
)
tdSql
.
checkRows
(
4
)
tdLog
.
info
(
'tdSql.checkData(0, 1, null)'
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdLog
.
info
(
'=============== step5'
)
tdLog
.
info
(
"insert into tb values (now+4m, a2)"
)
tdSql
.
error
(
"insert into tb values (now+4m, a2)"
)
tdLog
.
info
(
"insert into tb values (now-4m, -1)"
)
tdSql
.
error
(
"insert into tb values (now-4m, -1)"
)
tdLog
.
info
(
"insert into tb values (now+4m, 0)"
)
tdSql
.
execute
(
"insert into tb values (now+4m, 0)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 0)'
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdLog
.
info
(
'=============== step6'
)
tdLog
.
info
(
"insert into tb values (now+5m, 2a)"
)
tdSql
.
error
(
"insert into tb values (now+5m, 2a)"
)
tdLog
.
info
(
"insert into tb values (now+5m, 2)"
)
tdSql
.
execute
(
"insert into tb values (now+5m, 2)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(6)'
)
tdSql
.
checkRows
(
6
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 2)'
)
tdSql
.
checkData
(
0
,
1
,
2
)
tdLog
.
info
(
'=============== step7'
)
tdLog
.
info
(
"insert into tb values (now+6m, 2a'1)"
)
tdSql
.
error
(
"insert into tb values (now+6m, 2a'1)"
)
tdLog
.
info
(
"insert into tb values (now+6m, 2)"
)
tdSql
.
execute
(
"insert into tb values (now+6m, 2)"
)
tdLog
.
info
(
'select * from tb order by ts desc'
)
tdSql
.
query
(
'select * from tb order by ts desc'
)
tdLog
.
info
(
'tdSql.checkRow(7)'
)
tdSql
.
checkRows
(
7
)
tdLog
.
info
(
'tdSql.checkData(0, 1, 2)'
)
tdSql
.
checkData
(
0
,
1
,
2
)
tdLog
.
info
(
'drop database db'
)
tdSql
.
execute
(
'drop database db'
)
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# convert end
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/insert/unsig
e
nedBigint.py
→
tests/pytest/insert/unsignedBigint.py
浏览文件 @
e3ad6509
文件已移动
tests/pytest/insert/unsig
e
nedInt.py
→
tests/pytest/insert/unsignedInt.py
浏览文件 @
e3ad6509
文件已移动
tests/pytest/insert/unsig
e
nedTinyint.py
→
tests/pytest/insert/unsignedTinyint.py
浏览文件 @
e3ad6509
文件已移动
tests/pytest/tag_lite/delete.py
浏览文件 @
e3ad6509
...
...
@@ -954,8 +954,6 @@ class TDTestCase:
tdSql
.
execute
(
'alter table %s drop tag tgcol6'
%
(
mt
))
tdLog
.
info
(
'alter table %s drop tag tgcol8'
%
(
mt
))
tdSql
.
execute
(
'alter table %s drop tag tgcol8'
%
(
mt
))
tdLog
.
info
(
'alter table %s drop tag tgcol9'
%
(
mt
))
tdSql
.
execute
(
'alter table %s drop tag tgcol9'
%
(
mt
))
# TSIM:
# TSIM: sleep 5000
# TSIM:
...
...
@@ -1643,7 +1641,7 @@ class TDTestCase:
# TSIM: print =============== step14
tdLog
.
info
(
'=============== step14'
)
# TSIM: $i = 14
i
=
14
i
=
20
# TSIM: $mt = $mtPrefix . $i
mt
=
"%s%d"
%
(
mtPrefix
,
i
)
# TSIM: $tb = $tbPrefix . $i
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录