This talk is based on one I gave for the the [http://dev.zope.org/Members/tbryan/TriZPUG/FrontPage Triangle Python/Zope User Group] in November 2002. I am extending the content for the PyCon. The original talk covered the following topics:
- Definition of unit testing
- Why should you unit test?
- What does Python provide for unit testing?
- Simple example of using doctest
- unittest terminology and history
- Simple example with unittest
- Test-driven development with unittest
- Overview of more advanced unit testing issues
- What to expect when you start unit testing
I am cleaning up the existing content and adding more. I'd like to cover some of the more advanced topics, such as
- Refactoring test fixtures beyond the setUp and tearDown methods
- Writing testable code
- Using mock objects
- How to organize and run your tests
- More advanced options in unittest
I realize that all of this content would be too much to present in the time I have for my talk. I intend to come prepared for two talks. One talk is an introduction to unit testing in general and the basic use of doctest and unittest. The other talk is a quick overview of unit testing and unittest followed by some of the more advanced topics that should help you write unit tests for something more complex than a toy example. If you plan to attend my talk, please add your vote below. Which talk would *you* like to see?
Votes for the intro to unit testing talk
- Add your name here
Votes for the advanced unittest talk
- Or add your name here