tests: ensure file is closed in connection_test.

issue510
David Wilson 5 years ago
parent 73979043ad
commit eb93f82d05

@ -96,7 +96,11 @@ class PutFileTest(ConnectionMixin, unittest2.TestCase):
def setUpClass(cls):
super(PutFileTest, cls).setUpClass()
cls.big_path = tempfile.mktemp(prefix='mitotestbig')
open(cls.big_path, 'w').write('x'*1048576)
fp = open(cls.big_path, 'w')
try:
fp.write('x'*1048576)
finally:
fp.close()
@classmethod
def tearDownClass(cls):

Loading…
Cancel
Save