Sunday, June 30, 2019

Re: Running tests creates many unnecessary files


these temp files should be removed after they closed, but it looks it is not closed after tests executed.



On Friday, June 28, 2019 at 4:44:34 PM UTC+3, Uri Even-Chen wrote:

I found out that in the directory media of Speedy Net ( on my computer, there are more than 200,000 unnecessary files and more than 20,000 folders. I checked the time the files were created and it seems that they were created because I ran Django tests locally. Why are so many files and folders created and remain undeleted after the tests end? I would expect all the temporary files to be deleted when the tests end. We have many tests (I think more than 1,000 tests - and I ran them many times but I didn't expect so many unnecessary files to be created on my computer. Is there something I can do to prevent it?

I just ran all the tests locally now, after I deleted all the previous files and folder in media, and I found out that 903 files and 1,041 folders were created. I'm not sure which of our tests created these files and folders. Most of these files are either .jpg or .dat files. Is it possible to delete all these files automatically after the tests end?


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment