From fae31f234823474cd2b81efba56fa714cc34d9cd Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 21 Feb 2015 18:56:36 +0100 Subject: [1.8.x] Guaranteed removal of temporary files during tests. Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions. Backport of 934400759de817471ff37d736686201d7ae34e82 from master --- tests/staticfiles_tests/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/staticfiles_tests') diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py index 72f8f2fd79..45d29106d1 100644 --- a/tests/staticfiles_tests/tests.py +++ b/tests/staticfiles_tests/tests.py @@ -100,7 +100,7 @@ class BaseCollectionTestCase(BaseStaticFilesTestCase): """ def setUp(self): super(BaseCollectionTestCase, self).setUp() - temp_dir = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) + temp_dir = tempfile.mkdtemp() # Override the STATIC_ROOT for all tests from setUp to tearDown # rather than as a context manager self.patched_settings = self.settings(STATIC_ROOT=temp_dir) -- cgit v1.3