Unit Testing in Python

Thanks to whoever put the testserver into Django.  What a helpful thing.  It doesn’t solve all my testing problems, but it sure beats the alternative.

The big Pain In The Ass is moving from built-in unit tests to full REST tests using a REST client.

A client said they couldn’t do unit testing.  I’ve seen blog postings about how hard it is.  I think I may see the underlying problem.  While it is funny to see people try to wriggle out of testing, what I think is required is a set of meta-quality attributes.
“We have a web application; it takes forever to test.  What do we do?”
Look at Tim Bray’s posting on Refactoring, “Oooh, Cédric ”. An interesting comment is in “Python/Ruby: script languages, nothing more ”.
Ian Bicking has some notes on using Doctest to debug Logo programs [link ].
See Agile Testing [link ] PyCon 2006 tutorial on testing frameworks and how they fit together.
TestResources extends the TestCase and TestRunner to optimize a number of tests around the resources used.
SubUnit extends the definition of Test Runners to reach outside Python.
Since this is intimately married to Twisted, it may not be appropriate as a stand-alone testing tool. However, it has some slick extensions to the Fixture and TestSuite patterns.
Seven more testing tools (frameworks?)
Using the original Beck Test Framework as a yardstick. Part 3: nose, TestOOB, test.py. These three leverage the existing unittest (pyunit) module
Using the original Beck Test Framework as a yardstick. Part 2: py.test. Why this one product? Because it stands alone, unlike nose and TestOOB.
Using the original Beck Test Framework as a yardstick. Part 1: unittest and doctest.
Yes, there are a bunch. This means that (a) it’s important and (b) it’s easy. Everyone can throw their hat in this ring.
Building Skills Content Management Culture of Complexity Data Structures and Algorithms Databases and Python DocBook Economics of Software Macintosh Methodology for Non-Programmers Open Source Projects Personal Web Toys Technology News Test Driven Reverse Engineering The Lure of XML Unit Testing in Python User Interface War Stories and Advice

Previous topic

Essay 20 - Moving the Topsoil

Next topic

Testing RESTful web services in Django – Tantalizingly Close.

This Page