Fix py.test 2.4.0 on Python 3.1
Merge pull request #1531 from mdboom/tests/fix-pytest-on-py3.1

Restore compatibility with Python 3.1?