Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Table of Contents
Learning Python Testing
Learning Python Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
1. Python and Testing
Levels of testing
Acceptance testing
Regression testing
Test-driven development
You'll need Python
Summary
2. Working with doctest
The doctest language
Expecting exceptions
Expecting blank lines
Controlling doctest behavior with directives
Ignoring part of the result
Ignoring white space
Skipping an example
The other directives
The execution scope of doctest tests
Check your understanding
Exercise – English to doctest
Embedding doctests into docstrings
Putting it into practice – an AVL tree
Summary
3. Unit Testing with doctest
The limitations of unit testing
Check your understanding
Unit testing during the development process
Summary
4. Decoupling Units with unittest.mock
Mock objects according to unittest.mock
Mock objects in action
Summary
5. Structured Testing with unittest
Assertions
Make sure you get it
Test fixtures
Summary
6. Running Your Tests with Nose
Organizing tests
Simplifying the Nose command line
Customizing Nose's test search
Nose and doctest tests
Nose and unittest tests
Nose and ad hoc tests
Summary
7. Test-driven Development Walk-through
Writing initial unit tests
Coding planner.data
Using tests to get the code right
Writing the persistence tests
Finishing up the personal planner
Summary
8. Integration and System Testing
Automating integration tests and system tests
Check yourself – writing integration tests
Summary
9. Other Tools and Techniques
Version control integration
Automated continuous integration
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →