未验证 提交 dbff8637 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1603 from taosdata/change-pytest-code-to-support-python3

Upgrade Python to 3 instead of 2 for testcase development.
sudo python2 ./test.py -f insert/basic.py
sudo python3 ./test.py -f insert/basic.py
......@@ -73,7 +73,6 @@ if __name__ == "__main__":
if fileName == "all":
tdCases.runAllLinux(conn)
else:
tdLog.info("CBD LN78: %s" % (fileName))
tdCases.runOneLinux(conn, fileName)
conn.close()
else:
......
......@@ -22,27 +22,27 @@ class TDLog:
self.path = ""
def info(self, info):
print "%s %s" % (datetime.datetime.now(), info)
print("%s %s" % (datetime.datetime.now(), info))
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)
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):
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):
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):
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)
def printNoPrefix(self, info):
print "\033[1;36m%s\033[0m" % (info)
print("\033[1;36m%s\033[0m" % (info))
tdLog = TDLog()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册