From cb98ffe8f45d77a7e892fbb80b47de999062dc74 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 3 Sep 2013 13:37:27 -0400 Subject: Fixed a couple unclosed file warnings in tests --- tests/staticfiles_tests/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/staticfiles_tests') diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py index 7200037050..b73eea319a 100644 --- a/tests/staticfiles_tests/tests.py +++ b/tests/staticfiles_tests/tests.py @@ -783,10 +783,11 @@ class TestAppStaticStorage(TestCase): os.mkdir(self.search_path) module_path = os.path.join(self.search_path, 'foo_module') os.mkdir(module_path) - open(os.path.join(module_path, '__init__.py'), 'w') + self.init_file = open(os.path.join(module_path, '__init__.py'), 'w') sys.path.append(os.path.abspath(self.search_path)) def tearDown(self): + self.init_file.close() sys.path.remove(os.path.abspath(self.search_path)) shutil.rmtree(self.search_path) -- cgit v1.3