
Test-Driven Development with Python
by Harry J.W. Percival · first published 2014
18mentions
16recommended by
18HN commenters
2013–2023first – last mentioned
89% recommend11% neutral
Why HN recommends it
Step-by-step build and deployment of a Django web app with tests written at each stage, starting from Selenium. Funny, readable, and free online; suits those wanting TDD and Django practice together.
Summarised by Claude from recommending comments
<h2>Printing History</h2> <dl> <dt>August 2017:</dt><dd>Second Edition</dd> <dt>2017-08-02:</dt><dd>First Release</dd> <dt>2018-03-02:</dt><dd>Second Release</dd> </dl>
Affiliate links. As an Amazon Associate I earn from qualifying purchases.






Test-Driven Development with Python [http://chimera.labs.oreilly.com/books/1234000000754/index.ht...]
on “Ask HN: What are your recommended reads that are available for free?” ↗Test-Driven Development with Python by Harry Percival is kind of a Python/Django equivalent to the Ruby/Rails Tutorial. http://chimera.labs.oreilly.com/books/1234000000754
on “Learn Enough Git to Be Dangerous” ↗…http://django-unleashed.com/ Full Disclosure: I'm the author. If you're looking to go nuts, I recommend reading the first twelve chapters of Django Unleashed, following it up with Harry Percival's Test Driven Development with Python book (also written as a step-by-step guide), and then finishing Unleashed. http://chimera.labs.oreilly.com/books/1234000000754/index.ht... Two Scoops of Django (not a guide) is great to have after that.…
on “Ask HN: What are some books where the reader learns by building one project?” ↗Maybe these: Practical Object Oriented Design (Metz) Refactoring (Feathers) Test driven development with Python (Percival) Missing Semester: https://missing.csail.mit.edu/
on “Ask HN: How do I teach intermediate Python engineering skills?” ↗Another great resource that influenced my thinking on TDD even outside Python is the "testing goat" book (aka "Test-Driven Development with Python" by Harry Percival) https://www.obeythetestinggoat.com/
on “Learn Go with Tests” ↗…Life-Changing Magic of Tidying Up - Marie Kondo. I didn't like most of this book. But the tips for tidying up, as well as the surge of motivation you magically get just after reading it made the book worth it. Test-Driven Development with Python - Harry Percival. Obey the testing goat! Thanks to this book, all my current professional projects are using TDD. I had been making an effort to test code before, but generally after writing the code.…
on “Ask HN: Books you read in 2016?” ↗I'm guessing this was submitted after the "Ask HN" about leveling up to a production python programmer and i'm surprised no one mentioned these books: 1. Test-Driven Development with Python 2. Architecture Patterns with Python The 2nd one is the closest you're gonna get to a production-grade tutorial book. Related to this topic, these resources by @dbeazley: Barely an Interface https://github.com/dabeaz/blog/blob/main/2021/barely-interfa...…
on “Advanced Python Mastery – A Course by David Beazley” ↗Obey The Testing Goat!. Get yourself the book Test-Driven Development with Python. It will turn you into a an automated testing wizard. it is a great book and you will learn in no time how to run your automated tests. Then learn Docker and be amazed on how you can use Docker + Jenkins…
on “Ask HN: I am QA, How do I learn to code?” ↗Test Driven Development with Python (http://www.obeythetestinggoat.com/) teaches you to use Django and TDD practices to create a basic list web app.
on “Ask HN: What are some books where the reader learns by building one project?” ↗I've yet to read the entire thing, but one of the things that I liked about: "Test-Driven Development with Python" (uses Django, is free to read online) http://chimera.labs.oreilly.com/books/1234000000754 is that it starts out with: from selenium import webdriver browser = webdriver.Firefox() browser.get('http://localhost:8000')…
on “Flaskr: Intro to Flask, Test-Driven Development, and jQuery” ↗I've felt more or less the same as you and recently I've found Test-Driven Development with Python[0] to be a really nice resource. It is first and foremost a TDD book, which I certainly appreciate, but it takes you through creating an app in a (to my eyes at least) fairly rigorous way. It probably…
on “Django Developers Survery Results” ↗If you want to have a nice introduction into Django with web, a great place to start ist the open source book: Test Driven Development with Python https://www.obeythetestinggoat.com/book/preface.html
on “Learn web development” ↗Probably Test-Driven Development with Python. http://www.obeythetestinggoat.com/pages/book.html
on “I completed Ultimate Go, took good notes and commented directly on source code” ↗You might have a look at the O'Reilly book from August 2, 2017: "Test-Driven Development with Python: Obey the Testing Goat: Using Django, Selenium, and JavaScript" 2nd Edition
on “How to learn how to write great tests in Python?” ↗I can highly recommend Test-Driven Development with Python[0]. The book has you build and deploy a web application, with emphasis on writing tests at each stage of development. The author has a great sense of humour and the whole book is a fun read-through. [0]…
on “Ask HN: Books that teach you programming languages via systems projects?” ↗