django-nose
django-nose copied to clipboard
REUSE_DB=2 ./manage.py test
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 :)
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.
Ah, I understand! I hope it will go well!