From 5b2db4bb51548ce5f20b5f3fa5890c50514ec884 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 2 Apr 2017 20:47:44 +0300 Subject: [PATCH] tests/run-tests: Be sure to close Pyboard object on completion. So underlying device was properly closed too. --- tests/run-tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/run-tests b/tests/run-tests index e8dc2ba580..43db15097e 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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__":