Friday, June 28, 2019

Running tests creates many unnecessary files

Hi,

I found out that in the directory media of Speedy Net (https://github.com/speedy-net/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 - https://travis-ci.org/speedy-net/speedy-net/builds/551457609) 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?

Thanks,

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABD5YeF9JbEVNz_XvGrSTqjR%3Dj9mWkP3pdYf%2BiET3yzm%2B9j59w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment