This PR fixes a few issues related to the release of pytest-5.0.0, which is python3 only, and exposes a couple of bugs in some test code to do with error message handling.