mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #17215: Avoid generating 47 leftover tmp dirs during a clean test run.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b8353016b7
commit
5de31cb8cb
7 changed files with 11 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import datetime
|
||||
import tempfile
|
||||
|
||||
|
|
@ -6,7 +7,7 @@ from django.core.files.storage import FileSystemStorage
|
|||
from django.db import models
|
||||
|
||||
|
||||
temp_storage_location = tempfile.mkdtemp()
|
||||
temp_storage_location = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR'])
|
||||
temp_storage = FileSystemStorage(location=temp_storage_location)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue