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)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
|
||||
tdSql.query(abs_query)
|
||||
for row_index, row in enumerate(abs_result):
|
||||
for col_index, elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] != elem:
|
||||
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)
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
def test_errors(self):
|
||||
dbname = "testdb"
|
||||
|
|
|
@ -86,21 +86,12 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
|
||||
tdSql.query(pow_query)
|
||||
for row_index , row in enumerate(pow_result):
|
||||
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
|
||||
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 )
|
||||
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -86,21 +86,13 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
|
||||
tdSql.query(pow_query)
|
||||
for row_index , row in enumerate(pow_result):
|
||||
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
|
||||
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 )
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -84,21 +84,11 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
|
||||
tdSql.query(pow_query)
|
||||
for row_index , row in enumerate(pow_result):
|
||||
for col_index , elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] == None and elem:
|
||||
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 )
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -85,16 +85,11 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
tdSql.query(ceil_query)
|
||||
for row_index , row in enumerate(ceil_result):
|
||||
for col_index , elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] != elem:
|
||||
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 )
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -84,26 +84,10 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
print("========",pow_query, origin_query )
|
||||
|
||||
tdSql.query(pow_query)
|
||||
for row_index , row in enumerate(pow_result):
|
||||
for col_index , elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] == None and elem:
|
||||
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 )
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -85,16 +85,11 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
tdSql.query(floor_query)
|
||||
for row_index , row in enumerate(floor_result):
|
||||
for col_index , elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] != elem:
|
||||
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 )
|
||||
tdSql.checkData(row_index,col_index,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
def test_errors(self, dbname=DBNAME):
|
||||
error_sql_lists = [
|
||||
|
|
|
@ -91,7 +91,6 @@ class TDTestCase:
|
|||
elem = math.log(elem , base)
|
||||
elif elem <=0:
|
||||
elem = None
|
||||
|
||||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
|
|
|
@ -81,16 +81,12 @@ class TDTestCase:
|
|||
row_check.append(elem)
|
||||
auto_result.append(row_check)
|
||||
|
||||
check_status = True
|
||||
tdSql.query(round_query)
|
||||
for row_index , row in enumerate(round_result):
|
||||
for col_index , elem in enumerate(row):
|
||||
if auto_result[row_index][col_index] != elem:
|
||||
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 )
|
||||
tdSql.checkData(row_index , col_index ,auto_result[row_index][col_index])
|
||||
|
||||
|
||||
|
||||
def test_errors(self, dbname="db"):
|
||||
error_sql_lists = [
|
||||
|
|
Loading…
Reference in New Issue