Make tests compatible with pytest 2.4.0

This allows the tests to pass with pytest 2.4.0

In a subsequent commit, I will turn on pytest 2.4.0 on Travis, but first I want to confirm this doesn't break on pytest 2.3.