Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f95f9ac8
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f95f9ac8
编写于
5月 13, 2020
作者:
C
changshuaiqiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add create table as select case
上级
637e1ef3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
54 addition
and
4 deletion
+54
-4
tests/pytest/insert/multi.py
tests/pytest/insert/multi.py
+8
-2
tests/pytest/table/create.py
tests/pytest/table/create.py
+46
-0
tests/pytest/table/del_stable.py
tests/pytest/table/del_stable.py
+0
-2
未找到文件。
tests/pytest/insert/multi.py
浏览文件 @
f95f9ac8
...
...
@@ -37,9 +37,15 @@ class TDTestCase:
"CREATE TABLE if not exists dev_001 using st tags('dev_01')"
)
print
(
"==============step2"
)
tdLog
.
info
(
"multiple inserts"
)
tdLog
.
info
(
"multiple inserts
by insert
"
)
tdSql
.
execute
(
"INSERT INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
"insert INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
tdSql
.
checkAffectedRows
(
2
)
print
(
"==============step3"
)
tdLog
.
info
(
"multiple inserts by import"
)
tdSql
.
execute
(
"import INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
tdSql
.
checkAffectedRows
(
2
)
def
stop
(
self
):
...
...
tests/pytest/table/create.py
0 → 100644
浏览文件 @
f95f9ac8
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
print
(
"==============step1"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
print
(
"==============step2"
)
try
:
tdSql
.
execute
(
"create table db.test as select * from db.st"
)
except
Exception
as
e
:
tdLog
.
exit
(
e
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/table/del_stable.py
浏览文件 @
f95f9ac8
...
...
@@ -26,9 +26,7 @@ class TDTestCase:
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"drop database if exists db"
)
print
(
"==============step1"
)
tdSql
.
execute
(
"create database db"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录