提交 9d13fd24 编写于 作者: sangshuduo's avatar sangshuduo

Upgrade Python to 3 instead of 2 for testcase development.

[TD-139]
上级 d30ab1c5
sudo python2 ./test.py -f insert/basic.py sudo python3 ./test.py -f insert/basic.py
...@@ -73,7 +73,6 @@ if __name__ == "__main__": ...@@ -73,7 +73,6 @@ if __name__ == "__main__":
if fileName == "all": if fileName == "all":
tdCases.runAllLinux(conn) tdCases.runAllLinux(conn)
else: else:
tdLog.info("CBD LN78: %s" % (fileName))
tdCases.runOneLinux(conn, fileName) tdCases.runOneLinux(conn, fileName)
conn.close() conn.close()
else: else:
......
...@@ -22,27 +22,27 @@ class TDLog: ...@@ -22,27 +22,27 @@ class TDLog:
self.path = "" self.path = ""
def info(self, info): def info(self, info):
print "%s %s" % (datetime.datetime.now(), info) print("%s %s" % (datetime.datetime.now(), info))
def sleep(self, sec): def sleep(self, sec):
print "%s sleep %d seconds" % (datetime.datetime.now(), sec) print("%s sleep %d seconds" % (datetime.datetime.now(), sec))
time.sleep(sec) time.sleep(sec)
def debug(self, err): def debug(self, err):
print "\033[1;36m%s %s\033[0m" % (datetime.datetime.now(), err) print("\033[1;36m%s %s\033[0m" % (datetime.datetime.now(), err))
def success(self, info): def success(self, info):
print "\033[1;32m%s %s\033[0m" % (datetime.datetime.now(), info) print("\033[1;32m%s %s\033[0m" % (datetime.datetime.now(), info))
def notice(self, err): def notice(self, err):
print "\033[1;33m%s %s\033[0m" % (datetime.datetime.now(), err) print("\033[1;33m%s %s\033[0m" % (datetime.datetime.now(), err))
def exit(self, err): def exit(self, err):
print "\033[1;31m%s %s\033[0m" % (datetime.datetime.now(), err) print("\033[1;31m%s %s\033[0m" % (datetime.datetime.now(), err))
sys.exit(1) sys.exit(1)
def printNoPrefix(self, info): def printNoPrefix(self, info):
print "\033[1;36m%s\033[0m" % (info) print("\033[1;36m%s\033[0m" % (info))
tdLog = TDLog() tdLog = TDLog()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册