diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-21 18:56:36 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@oscaro.com> | 2015-02-23 16:55:26 +0100 |
| commit | 934400759de817471ff37d736686201d7ae34e82 (patch) | |
| tree | 834ceac28e66f7d81350a79a7f23fdb71e6cb1f4 /tests/staticfiles_tests | |
| parent | e83aba0e2cce16cd1b32d1c172239a4e20867e95 (diff) | |
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.
Diffstat (limited to 'tests/staticfiles_tests')
| -rw-r--r-- | tests/staticfiles_tests/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py index eafbdc9b9f..d8750f9e52 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) |
