I read Q&A why django create test database, but there is no answer on a question.
I have django 1.8.4 version.
My settings.py
if 'test' in sys.argv or 'test_coverage' in sys.argv:
DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3'
Run
time ./manage.py test
Raven is not configured (logging is disabled). Please see the documentation for more information.
/Users/ioganegambaputi/work/foobd/foobd/core/forms.py:7: RemovedInDjango19Warning: The django.forms.util module has been renamed. Use django.forms.utils instead.
from django.forms.util import ErrorList
/Users/ioganegambaputi/work/env/foobd/lib/python2.7/site-packages/templated_email/__init__.py:2: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
/Users/ioganegambaputi/work/foobd/foobd/core/utils.py:50: RemovedInDjango19Warning: 'get_cache' is deprecated in favor of 'caches'.
self.cache = cache.get_cache(cache_alias or cache.DEFAULT_CACHE_ALIAS)
Creating test database for alias 'default'...
real 0m53.102s
user 0m47.976s
sys 0m1.544s
The test works about 2-3 seconds, all other time it hangs in Creating test database for alias 'default'...
I think my database should be created in the memory very fast. I have no json dumps loaded. How can I make it faster? It seems I missed something...
Aucun commentaire:
Enregistrer un commentaire