tests/run-tests: Be sure to close Pyboard object on completion.

So underlying device was properly closed too.
pull/2993/head
Paul Sokolovsky 2017-04-02 20:47:44 +03:00
rodzic 9b3f423c14
commit 5b2db4bb51
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -456,7 +456,10 @@ def main():
# clear search path to make sure tests use only builtin modules
os.environ['MICROPYPATH'] = ''
if not run_tests(pyb, tests, args):
res = run_tests(pyb, tests, args)
if pyb:
pyb.close()
if not res:
sys.exit(1)
if __name__ == "__main__":