  >>> custom_storage.delete(first)
  >>> custom_storage.delete(second)
  """
  
  # Tests for a race condition on file saving (#4948).
  # This is written in such a way that it'll always pass on platforms 
  # without threading.
 
</s> remove >>> temp_storage = FileSystemStorage(location=tempfile.gettempdir())
 </s> add # Set up a unique temporary directory
>>> import os
>>> temp_dir = tempfile.mktemp()
>>> os.makedirs(temp_dir)

>>> temp_storage = FileSystemStorage(location=temp_dir) </s> remove >>> custom_storage = CustomStorage(tempfile.gettempdir())
 </s> add >>> custom_storage = CustomStorage(temp_dir)
# Cleanup the temp dir
>>> os.rmdir(temp_dir)

  >>> custom_storage.delete(first)
  >>> custom_storage.delete(second)
# Cleanup the temp dir
>>> os.rmdir(temp_dir)

  """
  
  # Tests for a race condition on file saving (#4948).
  # This is written in such a way that it'll always pass on platforms 
  # without threading.
keep add keep keep keep keep keep
 Fixed #8244: Modified the temporary directory used by file storage tests so that mutliple test runs can be performed in parallel without conflict. 

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8376 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/regressiontests/file_storage/tests.py