update case for restful mode run
This commit is contained in:
parent
b60bf7c877
commit
54bc2fc2ae
|
@ -204,18 +204,12 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
|
||||||
|
tdSql.query(abs_query)
|
||||||
for row_index, row in enumerate(abs_result):
|
for row_index, row in enumerate(abs_result):
|
||||||
for col_index, elem in enumerate(row):
|
for col_index, elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] != elem:
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice(
|
|
||||||
"abs function value has not as expected , sql is \"%s\" " % abs_query)
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info(
|
|
||||||
"abs value check pass , it work as expected ,sql is \"%s\" " % abs_query)
|
|
||||||
|
|
||||||
def test_errors(self):
|
def test_errors(self):
|
||||||
dbname = "testdb"
|
dbname = "testdb"
|
||||||
|
|
|
@ -86,21 +86,12 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(pow_query)
|
||||||
|
|
||||||
for row_index , row in enumerate(pow_result):
|
for row_index , row in enumerate(pow_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] == None and not (auto_result[row_index][col_index] == None and elem == None):
|
|
||||||
check_status = False
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
elif auto_result[row_index][col_index] != None and (auto_result[row_index][col_index] - elem > 0.00000001):
|
|
||||||
check_status = False
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("acos function value has not as expected , sql is \"%s\" "%pow_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("acos value check pass , it work as expected ,sql is \"%s\" "%pow_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
|
@ -86,21 +86,13 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
|
||||||
|
tdSql.query(pow_query)
|
||||||
for row_index , row in enumerate(pow_result):
|
for row_index , row in enumerate(pow_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] == None and not (auto_result[row_index][col_index] == None and elem == None):
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
elif auto_result[row_index][col_index] != None and (auto_result[row_index][col_index] - elem > 0.00000001):
|
|
||||||
check_status = False
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("asin function value has not as expected , sql is \"%s\" "%pow_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("asin value check pass , it work as expected ,sql is \"%s\" "%pow_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
|
@ -84,22 +84,12 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(pow_query)
|
||||||
|
|
||||||
for row_index , row in enumerate(pow_result):
|
for row_index , row in enumerate(pow_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] == None and elem:
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
elif auto_result[row_index][col_index] != None and (auto_result[row_index][col_index] - elem > 0.00000001):
|
|
||||||
check_status = False
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("atan function value has not as expected , sql is \"%s\" "%pow_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("atan value check pass , it work as expected ,sql is \"%s\" "%pow_query )
|
|
||||||
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
f"select atan from {dbname}.t1",
|
f"select atan from {dbname}.t1",
|
||||||
|
|
|
@ -85,16 +85,11 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(ceil_query)
|
||||||
for row_index , row in enumerate(ceil_result):
|
for row_index , row in enumerate(ceil_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] != elem:
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("ceil function value has not as expected , sql is \"%s\" "%ceil_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("ceil value check pass , it work as expected ,sql is \"%s\" "%ceil_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
|
@ -84,26 +84,10 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(pow_query)
|
||||||
print("========",pow_query, origin_query )
|
|
||||||
|
|
||||||
for row_index , row in enumerate(pow_result):
|
for row_index , row in enumerate(pow_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] == None and elem:
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
elif auto_result[row_index][col_index] != None and ((auto_result[row_index][col_index] != elem) and (str(auto_result[row_index][col_index])[:6] != str(elem)[:6] )):
|
|
||||||
# elif auto_result[row_index][col_index] != None and (abs(auto_result[row_index][col_index] - elem) > 0.000001):
|
|
||||||
print("=====")
|
|
||||||
print(row_index, col_index)
|
|
||||||
print(auto_result[row_index][col_index], elem, origin_result[row_index][col_index])
|
|
||||||
check_status = False
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("cos function value has not as expected , sql is \"%s\" "%pow_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("cos value check pass , it work as expected ,sql is \"%s\" "%pow_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
|
@ -85,16 +85,11 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(floor_query)
|
||||||
for row_index , row in enumerate(floor_result):
|
for row_index , row in enumerate(floor_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] != elem:
|
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("floor function value has not as expected , sql is \"%s\" "%floor_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("floor value check pass , it work as expected ,sql is \"%s\" "%floor_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname=DBNAME):
|
def test_errors(self, dbname=DBNAME):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
|
@ -91,7 +91,6 @@ class TDTestCase:
|
||||||
elem = math.log(elem , base)
|
elem = math.log(elem , base)
|
||||||
elif elem <=0:
|
elif elem <=0:
|
||||||
elem = None
|
elem = None
|
||||||
|
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
|
|
|
@ -81,16 +81,12 @@ class TDTestCase:
|
||||||
row_check.append(elem)
|
row_check.append(elem)
|
||||||
auto_result.append(row_check)
|
auto_result.append(row_check)
|
||||||
|
|
||||||
check_status = True
|
tdSql.query(round_query)
|
||||||
for row_index , row in enumerate(round_result):
|
for row_index , row in enumerate(round_result):
|
||||||
for col_index , elem in enumerate(row):
|
for col_index , elem in enumerate(row):
|
||||||
if auto_result[row_index][col_index] != elem:
|
tdSql.checkData(row_index , col_index ,auto_result[row_index][col_index])
|
||||||
check_status = False
|
|
||||||
if not check_status:
|
|
||||||
tdLog.notice("round function value has not as expected , sql is \"%s\" "%round_query )
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
tdLog.info("round value check pass , it work as expected ,sql is \"%s\" "%round_query )
|
|
||||||
|
|
||||||
def test_errors(self, dbname="db"):
|
def test_errors(self, dbname="db"):
|
||||||
error_sql_lists = [
|
error_sql_lists = [
|
||||||
|
|
Loading…
Reference in New Issue