Quickly get up to speed with unittest, nose, and pytest with this book.
Get you started fast
I’ve put together enough information about python testing frameworks to get you up to speed very quickly. But I didn’t stop there.
Quick but easy ramp up to using setup & teardown
Not to long after you get your first tests written, you are going to want to add setup and teardown methods and understand fixtures like the back of your hand. And this book will help you do just that.
This book starts with unittest, the xUnit style testing framework that is included as a standard library in Python. I walk through writing tests and running them, including a comprehensive look at unittest fixtures (setup and teardown at multiple levels).
I move on and cover Nose with the same examples as used in unittest, making it easy to compare/contrast the two frameworks.
Nose can run unittest, but you can also have non-unittest test classes, as well as stand alone test functions. The fixture model is also extended. All of this is covered in the book.
The last section is pytest. Pytest has all of the functionality of unittest, and nose, and then so much more. The fixture model for pytest can be daunting at first if you don’t have a guide. That’s why I start simple and walk you through from simple fixtures to more complex use cases.
Although I don’t cover all of pytest capabilities, there’s enough in here to get you to the advanced-intermediate pytest user gently but quickly.
You get this in pdf, epub, and mobi.
Where can you get it.
Both Gumroad and LeanPub allow most cards and PayPal.
Going through a third party like one of these trusted places makes sure you don’t have to trust me with any card information.
Since LeanPub fees are a tad higher, I’ve added 56 cents to the LeanPub price to cover this difference.
Yep. I did this in some lame paint-like program.
I’m planning on re-doing the cover sometime soon. (But that’s been a plan for a while, so, …..)