6 ms·
Getting Started with Django Lesson 3, Testing
- zalew 13y ago> 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 13y agoYeah, 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.
- zalew 13y agosure. discover-runner is still more convenient than the default one. from what I read on django-dev, 1.6 will probably switch to unittest2 which has a better discovery, not sure about the details though since I switched to nose.
- airlocksoftware 13y agoThanks 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.