Kaydet (Commit) 92dbf342 authored tarafından Alex Gaynor's avatar Alex Gaynor

Ensure that a file is closed in the tests

üst 69a4f383
......@@ -52,7 +52,8 @@ class DumpDataAssertMixin(object):
'exclude': exclude_list,
'primary_keys': primary_keys})
if filename:
command_output = open(filename, "r").read()
with open(filename, "r") as f:
command_output = f.read()
os.remove(filename)
else:
command_output = new_io.getvalue().strip()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment