From: Luke Kenneth Casson Leighton Date: Fri, 24 Jul 2020 11:06:08 +0000 (+0100) Subject: ah ha! not using "with" was not calling the "close" function X-Git-Tag: semi_working_ecp5~582 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ad4183479b6f1c39e61ffaedd008ba5f8982a77;p=soc.git ah ha! not using "with" was not calling the "close" function --- diff --git a/src/soc/fu/div/test/test_pipe_caller.py b/src/soc/fu/div/test/test_pipe_caller.py index 6753f8ad..a5e83887 100644 --- a/src/soc/fu/div/test/test_pipe_caller.py +++ b/src/soc/fu/div/test/test_pipe_caller.py @@ -208,8 +208,9 @@ class DivTestCases: initial_regs = [0] * 32 initial_regs[1] = ra initial_regs[2] = rb - prog = Program(l, bigendian) - self.run_test_program(prog, initial_regs) + # use "with" so as to close the files used + with Program(l, bigendian) as prog: + self.run_test_program(prog, initial_regs) def tst_rand_divwu(self): insns = ["divwu", "divwu.", "divwuo", "divwuo."]