Switch to py.test as per #1479.

Ready for review.