Introduction
This page concerns the talk on "Unit Testing in Python" that I will be giving at the PyCon 2003. The talk is scheduled for March 26, 1:45 - 2:45, in the Kayser room. I hope you'll attend! I check this page at least once per day, feel free to hit the Edit Text link and add your comments or questions to the section at the end. For more about me, see my Python wiki page TomBryan.
Vote for the talk you want to see!
This paper was prepared with the ability to support two talks. While all of the content will be available in the conference proceedings, I will only present part of the content during my scheduled time slot. If there is sufficient interest, I would be happy to present the other part of the content during an OpenSpace track at the conference if there is sufficient interest. Vote for the talk you'd prefer to attend.
Unit Testing in Python
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?
Current Votes
Votes for the intro to unit testing talk
- Add your name here
Votes for the advanced unittest talk
- Or add your name here
Jim Burgett
Comments from visitors to this page
Feel free to add your comments or questions to this section. --Tom