提交 acfec581 编写于 作者: L liuyq-617

revert pythonchecker

上级 86e6e9ec
......@@ -31,7 +31,7 @@ class ConnectorChecker:
numOfRows = self.cl.rowcount
numOfCols = len(self.cl.description)
for irow in range(numOfRows):
print("Row%d: ts=%s, temperature=%s" %(irow, data[irow][0], data[irow][1]))
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]))
except Exception as e:
print("Failure sql: %s,exception: %s" %sql,str(e))
def execute(self,sql):
......@@ -64,7 +64,7 @@ class ConnectorChecker:
sql="insert into test.weather (ts, temperature, humidity) values(now, 20.5, 34)"
self.execute(sql)
def checkSelect(self):
sql = "select * from db.tt"
sql = "select * from test.weather"
self.executeQuery(sql)
def srun(self):
try:
......@@ -97,11 +97,11 @@ def main(argv):
checker.init()
checker.sethdt(FQDN,dbname,tbname)
checker.srun()
# checker.createDatabase()
# checker.useDatabase()
# checker.checkDropTable()
# checker.createTable()
# checker.checkInsert()
checker.createDatabase()
checker.useDatabase()
checker.checkDropTable()
checker.createTable()
checker.checkInsert()
checker.checkSelect()
checker.checkDropTable()
checker.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册