On Tue, Sep 29, 2009 at 9:31 PM, Jeff Balogh <m...@jeffbalogh.org> wrote: > On Tue, Sep 29, 2009 at 8:56 PM, Rob Madole <robmad...@gmail.com> wrote: >> >> I'll see if I can talk Jeff into adding what he's got as a start to >> this. It looks solid to me. >> >> Ticket and patches forthcoming... > > The nose test-runner that I'm currently using is at > http://gist.github.com/197593. (The code I point to in the blog has > gotten more convoluted than I'd like; it turns out that can be a > problem if you're pointing at a vcs repo.) > > For the most part, switching test runners is simple since Django > exposes all the setup and teardown functions. The hacky part is > passing extra arguments to nose: Django doesn't recognize nose > arguments so it complains and dies if you try something like > `./manage.py test --pdb-fail`. Since I just wanted to get something > working, I pass all arguments after a '--' on the command line to nose > and Django happily ignores them. If something like nose_runner is > shipped with Django it should run normally and be able to show the > same help screen that `nose --help` shows. > > It was one of those "I'll come back and fix it later" sort of things. ;)
I've updated the script at https://gist.github.com/197593/9763da971f67c2c3bd25b2a7e4754e8b5d625087 to expose nose options as test_runner.options. Mixing options for the two packages is kind of hairy, but I don't think any of that is exposed to developers running the tests. Integrating outside options will require a patch to core/management/commands/test.py to import a test runner and ask it if it has extra options. Importing the test runner before creating the Command class should be backwards compatible unless people are writing test runners that import test.py (there'd be a circular import issue). It looks like this: http://gist.github.com/197797. I'll get a proper bug filed if this looks acceptable/interesting. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---