test.py: Handle opening and closing of files more appropriately.
test.py: Handle opening and closing of files more appropriately.

nanshe-org/runipy,kantale/runipy,jakirkham/runipy,paulgb/runipy,DudLab/runipy