fix(case): pexpect module expect return index

This commit is contained in:
Alex Duan 2022-12-03 17:48:47 +08:00
parent 0a219ec88f
commit a976d3a4c1
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
if len(sqlString) != 0:
child.sendline (sqlString)
w = child.expect(["Query OK", "Create OK", "Insert OK", "Drop OK", taosExpect.TIMEOUT, taosExpect.EOF], timeout=10)
if w == 0:
if w == 0 or w == 1 or w == 2:
return "TAOS_OK"
else:
print(1)