Overhaul the tests, switch to py.test.

Err has switched to py.test as its testing framework in 2.1 and so now
has this module.