Python Testing Training¶
This course describes an opinionated, brutally programtic method of performing unit, integration, and functional testing of Python software. A minimal number of programmers were hurt during its creation.
Contents:
- Trainer
- A Cynical Introduction To Testing
- Testing Types
- Installing Requirements
- Introduction to
unittest
- Mechanics of Running Project Tests
- Growing A Project With Tests
- Code Description
- Adding Unit Tests
- Under The Covers
- What Failure Looks Like
- Using Unittest Helper Methods
- Seeing Errors
- assertRaises
- Adding Coverage Reporting
- Running Tests via
nosetests
- Testing the
Portfolio.sell()
method - Uh Oh. Code That Integrates With Another System
- Stubs
- Stubbing
urllib
- Mocks
- Mocks or Stubs?
- Discussion
- Coda: setUp and tearDown
- Functional Tests
- Workflow
- Unit Testing Tenets
- Tools
- Continuous Integration
- Common Test Problems and Their Solutions
- Workshop (second half of day)