2014-10-07

如何解決升級 django 1.6/1.7 後 test runner 造成的問題?

如果你升級到 django 1.6.1 以上, 你可能會遇到以下錯誤訊息
這是因為 在 v1.6 以上時 test runner 的方式已經改了, 詳看這裡


$ python manage.py check
System check identified some issues:

WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.

System check identified 1 issue (0 silenced).



那麼這問題要怎麼解決呢?