django-nose icon indicating copy to clipboard operation
django-nose copied to clipboard

REUSE_DB=2 ./manage.py test

Open harukaeru opened this issue 10 years ago • 2 comments

I usually use $ export REUSE_DB=1 $ ./manage.py test It always work. Thank you so much for your job!

However, whenever I change the model file, I should do 'migrate', and then REUSE_DB=0. e.g. $ export REUSE_DB=0 # destroy old database $ ./manage.py test # long time... $ export REUSE_DB=1 # save new database $ ./manage.py test # long time...

So I add the this statement "os.getenv('REUSE_DB', 'false') != '2':" $ REUSE_DB=2 ./manage.py test # destroy old database and save new database

If you don't mind, please merge this changes :)

harukaeru avatar Jul 11 '15 05:07 harukaeru

This is an interesting solution. There is a lot of broken magic with REUSE_DB=1 right now, so I am reluctant to add any more features until the bugs are fixed.

jwhitlock avatar Jul 13 '15 15:07 jwhitlock

Ah, I understand! I hope it will go well!

harukaeru avatar Jul 14 '15 17:07 harukaeru