python - Does django need to set TEST_RUNNER first to run doctest? -


i started deadly simple django project try django's doctest:

# models.py """ >>> 1+1 == 2 true """ 

and run python manage.py test get:

creating test database alias 'default'...  ---------------------------------------------------------------------- ran 0 tests in 0.000s  ok destroying test database alias 'default'... 

same running python manage.py play.

i fixed setting:

installed_apps = ( ... 'django_nose', ) test_runner = 'django_nose.nosetestsuiterunner' nose_args = ['--with-doctest'] 

my question whether setting needed or not? cause it's not mentioned in doc: https://docs.djangoproject.com/en/1.4/topics/testing/

my django version 1.7, difference between 1.4 , 1.7?

since 1.6, doctests no longer automatically discovered django. you'll find more on how integrate doctests in 1.6 release documentation.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -