yaotti's diary

Software is Eating the World

djangoでの良いテスト方法

djangoでのユニットテストに関する情報が検索しても全然ヒットしないので,英語で書いた.
Write some codes.: Test python codes with Django


djangoではなくpythonのテストをしたいなら,とりあえずeasy_install noseとeasy_install rednoseして,~/.nosercに


[nosetests]
verbosity=3
nocapture=1
rednose=1

を書けば良いです.あとは
$ nosetests t/models/user.py
とかすればproveっぽくテスト+表示してくれる.