Fixed running python examples --test
for python3; needs to be tested under windows.
This commit is contained in:
parent
8d7ab108fd
commit
1e82104986
@ -252,6 +252,7 @@ except:
|
||||
else:
|
||||
process = subprocess.Popen(['exec %s -i' % (exe)], shell=True, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
process.stdin.write(code.encode('UTF-8'))
|
||||
process.stdin.close() ##?
|
||||
output = ''
|
||||
fail = False
|
||||
while True:
|
||||
@ -266,8 +267,8 @@ except:
|
||||
break
|
||||
time.sleep(1)
|
||||
process.kill()
|
||||
#process.wait()
|
||||
res = process.communicate()
|
||||
#res = process.communicate()
|
||||
res = (process.stdout.read(), process.stderr.read())
|
||||
|
||||
if fail or 'exception' in res[1].decode().lower() or 'error' in res[1].decode().lower():
|
||||
print('.' * (50-len(name)) + 'FAILED')
|
||||
|
Loading…
Reference in New Issue
Block a user