Nicholson's biography can be read at http://infiniterecursion.com.au/people/.
He is currently involved in designing web application using Django for an Article Repository project on http://www.havingfunwithlinux.com/. The project would allow users to post their article for public view and bookmark it onto their favorite blog.
Preface
Like any programmer, you need to be able to produce reliable code that conforms to a specification, which means that you need to test your code. In this book, you'll learn how to use techniques and Python tools that reduce the effort involved in testing, and at the same time make it more usefuland even fun.
You'll learn about several of Python's automated testing tools, and you'll learn about the philosophies and methodologies that they were designed to support, like unit testing and test-driven development. When you're done, you'll be able to produce thoroughly tested code faster and more easily than ever before, and you'll be able to do it in a way that doesn't distract you from your "real" programming.
What this book covers
: Testing for Fun and Profit introduces Python test-driven development and various testing methods.
: Doctest: The Easiest Testing Tool covers the doctest tool and teaches you how to use it.
: Unit Testing with Doctest introduces the ideas of unit testing and test-driven development, and applies doctest to create unit tests.
: Breaking Tight Coupling by using Mock Objects covers mock objects and the Python Mocker tool.
: When Doctest isn't Enough: Unittest to the Rescue introduces the unittest framework and discusses when it is preferred over doctest.
: Running Your Tests: Follow Your Nose introduces the Nose test runner, and discusses project organization.
: Developing a Test-Driven Project walks through a complete test-driven development process.
: Testing Web Application Frontends using Twill applies the knowledge gained from previous chapters to web applications, and introduces the Twill tool.
: Integration Testing and System Testing teaches how to build from unit tests to tests of a complete software system.
: Other Testing Tools and Techniques introduces code coverage and continuous integration, and teaches how to tie automated testing into version control systems.
: Answers to Pop Quizes contains the answers to all pop quizes, chapter-wise.
What you need for this book
To use this book, you will need a working Python interpreter, preferably one of the 2.6 version series. You'll also need a source code editor, and occasional access to the internet. You will need to be comfortable enough using your operating system's textual interfaceyour DOS prompt or command shellto do basic directory management and to run programs.
Who this book is for
If you are a Python developer and want to write tests for your applications, this book will get you started and show you the easiest way to learn testing.
You need to have sound Python programming knowledge to follow along. An awareness of software testing would be good, but no formal knowledge of testing is expected nor do you need to have any knowledge of the libraries discussed in the book.
Conventions
In this book, you will find several headings appearing frequently.
To give clear instructions of how to complete a procedure or task, we use:
Time for action heading
Instructions often need some extra explanation so that they make sense, so they are followed with:
What just happened?
This heading explains the working of tasks or instructions that you have just completed.
You will also find some other learning aids in the book, including:
Pop quiz heading
These are short multiple choice questions intended to help you test your own understanding.