Live data from Hacker News

Getting Started with Django Lesson 3, Testing

gettingstartedwithdjango.com

1–5 of 5 posts

Re: Getting Started with Django Lesson 3, Testing

#2
> 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

Re: Getting Started with Django Lesson 3, Testing

#3
post #2

> 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_cov…

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.

Re: Getting Started with Django Lesson 3, Testing

#5
post #2

> 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_cov…

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.

sure. 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.