top | item 5446123

Getting Started with Django Lesson 3, Testing

70 points| kennethlove | 13 years ago |gettingstartedwithdjango.com | reply

4 comments

order
[+] zalew|13 years ago|reply
> Django-discover-runner is basically just a smarter version of Django's default test runner.

personally I use nose wrapped in django-jenkins and so far happy with it

my test conf is

    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
    JENKINS_TEST_RUNNER = 'django_jenkins.nose_runner.CINoseTestSuiteRunner'
    JENKINS_TASKS = (
    'django_jenkins.tasks.run_pep8',
    'django_jenkins.tasks.run_pylint',
    'django_jenkins.tasks.with_coverage',
    'django_jenkins.tasks.django_tests',
    'django_jenkins.tasks.run_sloccount',
    )
    NOSE_ARGS = ['--with-fixture-bundling', ]
    
and run it

    ./manage.py jenkins --pep8-ignore=E501,W602 --pylint-rcfile=.pylint --coverage-html-report=reports/html
the pep8-ignore is because it somehow doesn't respect the .pep8

fixture-bundling is a nice feature that speeds up the process

[+] kennethlove|13 years ago|reply
Yeah, that'll work. django-discover-runner is less invasive, IMO, though, and works really nicely with standard Django testing setups or more-package-oriented ones.
[+] airlocksoftware|13 years ago|reply
Thanks for making these, Ken. I just did the first one yesterday, and it's been great so far. I especially appreciate the full transcript / notes for the videos.