I have been working on some tests for an upcoming product at SWIX and as any good developer I think its important to make an effort to constantly be learning new things. In this vein I starting digging through the videos for this years Pycon US. Lo and Behold Testing was a popular topic at Pycon so there were lots of talks to watch!
Testing and Django - Carl Meyer
Carl Meyer gives this great deep dive into testing Django projects, there are plenty of gems in here, including some code for a Django Test Runner using Unittest2's test discovery. Carl gives some great tips for writing tests with Django as well as tips for just writing good tests in general.
Fast Test, Slow Test - Gary Bernhardt
This talk is superb. Gary Bernhardt talks about how to write a fast test suite as well as how you should be testing your applications. He points out that the slow test suite problem is usually releated to the problem of test authors writing Unit Tests which are actually System Tests.
Those two testing talks were my favorites, but some other good ones that are worth checking out are:
- Certainty in an Uncertain World: Gaining Confidence through Security Testing - Geremy Condra
- Fake It Til You Make It: Unit Testing Patterns With Mocks and Fakes - Brian K. Jones
- Speedily Practical Large-Scale Tests - Erik Rose
- Stop Mocking, Start Testing - Augie Fackler & Nathaniel Manista
- pytest - rapid and simple testing with Python - Holger Krekel
Besides these videos another great resource to take your Python testing a bit farther is this book, the Python Testing Cookbook . It has plenty of great strategys that you can use for testing your Python projects.
If you have any other good Django testing tips or Talks leave them in the comments. If you are looking for more Python news, tips and discussion you should check out Pycoders Weekly, a weekly Python newsletter that I curate.