diff --git a/compiler/tests/30_openram_test.py b/compiler/tests/30_openram_test.py index 51546ae3..81864840 100755 --- a/compiler/tests/30_openram_test.py +++ b/compiler/tests/30_openram_test.py @@ -64,10 +64,13 @@ class openram_test(openram_test): self.assertTrue(len(files)>0) # grep any errors from the output - output = open("{0}/output.log".format(out_path),"r").read() + output_log = open("{0}/output.log".format(out_path),"r") + output = output_log.read() + output_log.close() self.assertEqual(len(re.findall('ERROR',output)),0) self.assertEqual(len(re.findall('WARNING',output)),0) + # now clean up the directory if os.path.exists(out_path): shutil.rmtree(out_path, ignore_errors=True)