fix(case): pexpect module expect return index
This commit is contained in:
parent
0a219ec88f
commit
a976d3a4c1
|
@ -63,7 +63,7 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
|
||||||
if len(sqlString) != 0:
|
if len(sqlString) != 0:
|
||||||
child.sendline (sqlString)
|
child.sendline (sqlString)
|
||||||
w = child.expect(["Query OK", "Create OK", "Insert OK", "Drop OK", taosExpect.TIMEOUT, taosExpect.EOF], timeout=10)
|
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"
|
return "TAOS_OK"
|
||||||
else:
|
else:
|
||||||
print(1)
|
print(1)
|
||||||
|
|
Loading…
Reference in New Issue