Entries tagged with testing
Enable setup.py test in your Django apps
Erich Holscher has posted a blog entry with the same title about a year ago. This helped me out quite a lot to get python setup.py test working with a reusable app.
Unfortunatelly the code in his blog post is not working anymore exactly like this. Django has changed its internal structure of its default test runner. So here is how you can get setup.py test working today.
A quote from Volker Dusch
Unittests are like a warm blanket you can wrap yourself into if you need to go out into the codeforest to refactor
Test Driven Development - The Django Way
http://od-eon.com/blogs/tudor/test-driven-development-django-way/
Nice little write up about test driven development with django. Nothing special or excitingly new but I wanted to post it because I followed nearly the same principles in my last big project.
It worked very nice and I will do it the same way with the next project.
Integrate your python test runner into vim
I've lately browsed the dotfiles repository
of Gary Bernhardt and found a wonderful gem in
his .vimrc. He has implemented some clever functions that run your testsuite
and shows you a pretty, colorful bar below your statusline to indicate if all
tests have passed or if some of them have failed.
If your tests are passing, it shows you a bright green bar to visualize that everything went well. If some test are failing your quickfix list is populated with all failing assertions and your cursor jumps to the first one.
I adapted his implementation and changed some points to make it fit for my work with django. The code can find out to which app the file you are editing belongs to and only runs tests for this particular application.
Testing your first django app
http://dougalmatthews.com/articles/2010/jan/20/testing-your-first-django-app/
Dougal Matthews wrote, as he said, the unofficial fifth part of the django tutorial. It'a about testing and seem to be a very clear and easy to start with. So … if you don't test your django code yet: Start doing it!
After you get a bit routine in writing tests you will notice that it's not too time consuming writing them but will save you a lot of stressfull hours afterwards.
Subscribe to this tag's feed.
about
Gregor Müllegger's Weblog on django, python, vim and anything else.
Feel free to contact me if you have question about my life, my work or my projects.
