I started a deadly simple django project to try django's doctest:
# models.py
"""
>>> 1+1 == 2
True
"""
and run python manage.py test
get:
Creating test database for alias 'default'...
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Destroying test database for alias 'default'...
Same as running python manage.py play
.
I fixed this by setting:
INSTALLED_APPS = (
...
'django_nose',
)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
NOSE_ARGS = ['--with-doctest']
My question is that whether my setting is needed or not? Cause it's not mentioned in the doc: https://docs.djangoproject.com/en/1.4/topics/testing/
My django version is 1.7, is it the difference between 1.4 and 1.7?