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

revert pythonchecker

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